Skip to content
This repository has been archived by the owner on May 26, 2020. It is now read-only.

Jq Array Deference doesnt work in this extension. #502

Open
loneshark99 opened this issue Feb 9, 2020 · 1 comment
Open

Jq Array Deference doesnt work in this extension. #502

loneshark99 opened this issue Feb 9, 2020 · 1 comment

Comments

@loneshark99
Copy link

Expected Behaviour

curl https://raw.githubusercontent.com/LearnWebCode/json-example/master/pets-data.json | jq '.pets[]'

should return
{
"name": "Purrsloud",
"species": "Cat",
"favFoods": [
"wet food",
"dry food",
"any food"
],
"birthYear": 2016,
"photo": "https://learnwebcode.github.io/json-example/images/cat-2.jpg"
}
{
"name": "Barksalot",
"species": "Dog",
"birthYear": 2008,
"photo": "https://learnwebcode.github.io/json-example/images/dog-1.jpg"
}
{
"name": "Meowsalot",
"species": "Cat",
"favFoods": [
"tuna",
"catnip",
"celery"
],
"birthYear": 2012,
"photo": "https://learnwebcode.github.io/json-example/images/cat-1.jpg"
}

Current Behaviour

If I try the previous on

Possible Solution

Steps to Reproduce (for bugs)

curl https://raw.githubusercontent.com/LearnWebCode/json-example/master/pets-data.json | jq '.pets[]'

Current behavior :
[
{
"name": "Purrsloud",
"species": "Cat",
"favFoods": [
"wet food",
"dry food",
"any food"
],
"birthYear": 2016,
"photo": "https://learnwebcode.github.io/json-example/images/cat-2.jpg"
},
{
"name": "Barksalot",
"species": "Dog",
"birthYear": 2008,
"photo": "https://learnwebcode.github.io/json-example/images/dog-1.jpg"
},
{
"name": "Meowsalot",
"species": "Cat",
"favFoods": [
"tuna",
"catnip",
"celery"
],
"birthYear": 2012,
"photo": "https://learnwebcode.github.io/json-example/images/cat-1.jpg"
}
]

This doesnt deference the array, so every filter after this breaks.

Context

Your Environment

  • Version used:
  • Environment name and version (e.g. Chrome 39):
  • Operating System and version (desktop or mobile):
@mrandi
Copy link
Member

mrandi commented Feb 10, 2020

@loneshark99 thx for reporting the issue. We will take a look and provide a fix, can't tell how fast right now but if you can/prefer we appreciate also PR.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants