Syntax for using PLUCK from Firebase JSON with complex schema

Hi :wink:

I need a list of values that originate in Firebase. The structure of my data seems to be more complex than the documentation about the PLUCK function. From the following schema, how can I get a list of MATNR_COMPONENT?

image

I cannot seem to craft the second parameter to get any results
PLUCK(pageVars.componentList, “document.MATNR_COMPONENT.stringValue”) or
PLUCK(pageVars.componentList, “document.fields.MATNR_COMPONENT.stringValue”)

Do you need PLUCK or LOOKUP? Anyway I think you may have to use several inside of each other to get that deep into the nesting :sweat_smile:

I have a mental block. I have reduced the requirement down to getting a list rather than a single value.

pageVars.componentList[1].document.fields.MATNR_COMPONENT.stringValue gives me a single value.

How do I return all of the items in from the componentList LIST.

pageVars.componentList.document.fields.MATNR_COMPONENT.stringValue does not seem to work in a formula.

Got it: MAP(pageVars.componentList, item.document.fields.MATNR_COMPONENT.stringValue)

1 Like