support nested JSON?
See original GitHub issueI have a nested JSON object like:
[
{
user : {
"fname" : "Joe",
"lname" : "Smith"
},
execution : {
...
}
}
...
]
I tried methods mentioned in #98 such as:
settings:{
columns:{
user:{
title:"First Name",
valuePrepareFunction: (user) => {
return user.fname;
}
},
user:{
title:"Last Name",
valuePrepareFunction: (user) => {
return user.lname;
}
}
}
}
Although this doesn’t work and only displays the last one.
Is there any way to have this functionality? Or do I need to reformat my JSON?
Issue Analytics
- State:
- Created 6 years ago
- Reactions:3
- Comments:8
Top Results From Across the Web
JSON nested objects
JSON nested objects ... Objects can be nested inside other objects. Each nested object must have a unique access path. The same field...
Read more >Format Nested JSON Output with PATH Mode - SQL Server
PATH mode lets you create wrapper objects and nest complex properties. The results are formatted as an array of JSON objects.
Read more >Simplify Querying Nested JSON with the AWS Glue ...
Relationalize transforms the nested JSON into key-value pairs at ... Let's look at how Relationalize can help you with a sample use case....
Read more >Nested JSON objects - do I have to use arrays for everything?
You don't need to use arrays. JSON values can be arrays, objects, or primitives (numbers or strings). You can write JSON like this:...
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
I resolved like this…
`
// my model export class Profile { id: number; desc: string; }
// my list of values. you can load from services… 😃 and map to {value, title} structure profileFilterList = [ { value: 1, title: ‘A’ }, { value: 2, title: ‘B’ }, { value: 3, title: ‘C’ } ]; … other columns … “profile”: { “title”: “Profile”, valuePrepareFunction: (cell: any, row: any) => { return row.profile.desc }, filter: { type: ‘list’, config: { selectText: ‘All’, list: this.profileFilterList } }, filterFunction(profile?: any, search?: string | number): boolean {
Hope it works!
The same problem occours when trying to use the Sorting/Filtering on the columns.