json_table icon indicating copy to clipboard operation
json_table copied to clipboard

Nested field declaration references to wrong item

Open haba713 opened this issue 5 years ago • 2 comments

Nested field declaration does not work if child item has the same key name than its parent and parent key is introduced after child in JSON data.

final String json = '['
    '{ "sub": { "id": "A-sub" }, "id": "A" },'
    '{ "sub": { "id": "B-sub" }, "id": "B"  } '
    ']';
var columns = [
  JsonTableColumn("id", label: "Id"),
  JsonTableColumn("sub.id", label: "Sub Id")
];

Expected result:

Id   Sub Id
--   ------
A    A-sub 
A    B-sub 

Actual result:

Id   Sub Id
--   ------
A    A
A    B

haba713 avatar Mar 23 '20 17:03 haba713

Looks weird. I already use it in my project. Wait will check

apgapg avatar Mar 24 '20 05:03 apgapg

Wait will check

Hi apgapg! Any progress?

haba713 avatar Apr 22 '20 13:04 haba713