Apify and Crawlee Official Forum

Updated 3 months ago

Help regarding Apify Output schema nested fields

Plain Text
{
  "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
A
g
7 comments
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
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.
Attachment
image.png
Attachment
image.png
but shows up in the all fields
Attachment
image.png
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
Thanks, actually I went through this but no luck as of now.
Add a reply
Sign up and join the conversation on Discord