How to filter using JSON object instead of array as a source?
See original GitHub issueUsing the JSON as source, I see that we can filter and search by key. But how I do this if my JSON source is not an array, but an object?
My current source is something like that (you can ignore the id, I don’t want to show/search for) and I’m following the documentation (list works well):
Edit: Search does not work either.
[
{
"0": {
"path": "xxxxxxxxxxxxxxxxxxxx",
"type": "file",
"sha": "1111111111111111",
"url": "https://xxxxxxxxxxxxxxxxxxxx"
},
"1": {
"path": "yyyyyyyyyyyyyy",
"type": "file",
"sha": "00000000000",
"url": "https://yyyyyyyyyyyyyyy"
}
}
]
Issue Analytics
- State:
- Created 3 years ago
- Reactions:1
- Comments:17 (7 by maintainers)
Top Results From Across the Web
How to filter JSON Object (JavaScript) - Stack Overflow
filter instead : const result = Object.values(data).filter(item => item.id ... You can use startsWith method to get desired result:
Read more >JSONata Cheatsheet - Stedi Docs
The data filtering expressions operate on the same basis as for the JSON object source documents. Instead of selecting an array field, you...
Read more >Perform data operations in Azure Logic Apps - Microsoft Learn
To create an array that has JSON objects built from values in an existing array, use the Select action. For example, you can...
Read more >How to Use JSONPath to filter JSON data - Telerik Reporting
If the parent object is used directly the report would not display any detail records. Therefore it is more convenient to return an...
Read more >Loading Data - Tabulator
Tabulator expects the server to JSON formatted array of row data objects. ... can use the filterMode option to send the filter data...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
Hey,
I just made a PR to allow nested properties with dot-notation (#60).
This will allow you to make queries like:
Hey guys,
To make sure I understand correctly, what you want is a single json file containing an array, so you can search and get a single item from it?
So flattening the array would do the trick?