Hi,
I have a simple object like:
data=[{
"name" : "Rush",
"address" :
{
"number" : "2112"
}
}]
In my perspective Table I have 2 columns
First column, field = name
Second column, field = address.number
Is this possible to do that ? I got no success making this works.
If it's possible, what is the correct syntax ?
No, the field
expects a string key which matches either a top-level key in the objects, or a column in the dataset which is in data
. To use the address number as a column, you'll need to modify the object in use so that the number
key is at the top level.
Within a transform you could do something like this:
entries = []
for entry in value:
entry["number"] = entry["address"]["number"]
entries.append(entry)
return entries