Array of complex objects?
See original GitHub issueWhat would that look like?
IE:
[
{
"name":"Apple",
"binomial name":"Malus domestica",
"major_producers":[
{
"name": "China",
"amount": 100,
},
{
"name": "United States",
"amount": 200,
},
{
"name": "Turkey",
"amount": 300,
},
]
},
]
Would there just be a number added to the columns (fruit_major_producers_1_name, fruit_major_producers_1_amount)? What if fruit 2 (not pictured) had greater or less than fruit 1 number of major producers? Null columns?
Issue Analytics
- State:
- Created 5 years ago
- Comments:9 (4 by maintainers)
Top Results From Across the Web
Create array from complex array objects & loops in javascript
First of all, there are some error in your order array, note the difference between {} (for objects) and [] . Then it...
Read more >Working With Complex Objects in Javascript
let's look back at the structure we saw, and see that the pieces are inside an array that's inside the store object. This...
Read more >Data Structures: Objects and Arrays - Eloquent JavaScript
Objects allow us to group values—including other objects—to build more complex structures. The programs we have built so far have been limited by...
Read more >8.4 Arrays of Objects
8.4 Arrays of Objects ... Complex[] points = new Complex [100];. This would create an array of 100 values (points [0], points [1],...
Read more >Send arrays or complex objects - Nintex help documentation
You can send arrays or complex objects by configuring your OpenAPI Specification to use the complex object renderer. Note: It is not possible...
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 Free
Top 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

If you can imagine each level 1 object to be a tree. Then, an array or an object, no matter at what nesting level it appears, will be reduced by following these 2 rules…
The value will always be the leaf node.
Ex: China or 100The key will be the concatenation of all parent node names with an ‘_’ as separator.
Ex: fruit_major_producers_0_name or fruit_major_producers_0_amount2.1. In case of Arrays, the immediate parent of the value is the indexthis is why the number 0 is appended, it is the index of that object within major_producers arrayThese rules from the post I referenced above…
Hope it helps!!
Helps a lot. Thanks for the quick replies.