super-elements / super-grid

0 stars 0 forks source link

Grid Should accept nested JSON #6

Open prakash1517 opened 7 years ago

prakash1517 commented 7 years ago

Super grid should be able to consume nested JSON data as data source in it , other grids also supports this in different ways Please refer

Example

Items = [ { name: 'xyz',
            age:   'ab',
            address: [ { address1: { street : 'skt',
                                     city: 'DLI',
                                     pincode: '0000000'
                                   },
                     } ],
           },
           { name: 'zzzz',
             age:   'ccc',
             address: [ { address1: { street : '420',
                                      city: 'LKO',
                                      pincode: '0000001'
                                    },
                      } ],
          } ] 

If we want to set the above data in the super-grid as

S.No. Name Age Pincode
1 xyz ab 000000
2 zzzz ccc 000001
shljk commented 7 years ago

Items = [ { name: 'xyz', age: '23', address: [ { address1: { street : 'skt', city: 'DLI', pincode: '0000000' }, } ], }, { name: 'abc', age: '90', address: [ { address1: { street : '420', city: 'LKO', pincode: '0000001' }, } ], } ] when we want to change the nested object from items JSON of iron-list . It's not working. For example: I want to replace the Items[0].age'23' to Items[0].age '30'. Items = [ { name: 'xyz', age: '30', address: [ { address1: { street : 'skt', city: 'DLI', pincode: '0000000' }, } ], }, { name: 'zzzz', age: '90', address: [ { address1: { street : '420', city: 'LKO', pincode: '0000001' }, } ], } ]