CA
vicious-gold

Help regarding Apify Output schema nested fields

{
"actorSpecification": 1,
"name": "my_actor",
"title": "MY Acror",
"version": "1.0",
"buildTag": "latest",
"environmentVariables": {},
"storages": {
"dataset": {
"actorSpecification": 1,
"views": {
"overview": {
"title": "Overview",
"transformation": {
"fields": [
"listing",
"details.price_details"
],
"flatten": [
"listing",
"details.price_details",
]
},
"display": {
"component": "table",
"properties": {
"listing": {
"label": "category",
"format": "object"
},
"details.price_details": {
"label": "price_details",
"format": "object"
}
}
}
}
}
}
}
}
{
"actorSpecification": 1,
"name": "my_actor",
"title": "MY Acror",
"version": "1.0",
"buildTag": "latest",
"environmentVariables": {},
"storages": {
"dataset": {
"actorSpecification": 1,
"views": {
"overview": {
"title": "Overview",
"transformation": {
"fields": [
"listing",
"details.price_details"
],
"flatten": [
"listing",
"details.price_details",
]
},
"display": {
"component": "table",
"properties": {
"listing": {
"label": "category",
"format": "object"
},
"details.price_details": {
"label": "price_details",
"format": "object"
}
}
}
}
}
}
}
}
"details.price_details" is itself nested, how to flatten it in output scheme? Thanks
6 Replies
Alexey Udovydchenko
Pls elaborate, in example above object property used for output, if you change it to object i.e. just "details" then output should be expandable tooltip so you have choice to output single properties by your choice or object as a whole
vicious-gold
vicious-goldOP2y ago
Hi Thank you for your response. Actually "details.price_details" is an object too eg details.price_details = { normal_price: 78, formated_price: "$78.00" } With the above output scheme I am getting undefined (in table format), but when I peek into the json data the data is there.
No description
vicious-gold
vicious-goldOP2y ago
No description
vicious-gold
vicious-goldOP2y ago
but shows up in the all fields
No description
Alexey Udovydchenko
Hm, I not sure if its UI glitch or something to do with formatting. Just in case: https://docs.apify.com/platform/actors/development/actor-definition/output-schema
vicious-gold
vicious-goldOP2y ago
Thanks, actually I went through this but no luck as of now.

Did you find this page helpful?