I’m having trouble grabbing data from meta data arrays to output into a column in google sheets. I’ve read pretty much every article related to this, but I’m still stumped.
I can see the data in the woocommerce module under line items>collection 1>metadata>collections 1 2 and 3…
So I need to map them, right? Like I said, I’ve been reading articles in here explaining similar things, and I use the get and map functions as outlined in some topics…
but this isn’t working.
I’m not sure what I’m doing wrong. Any help would be greatly appreciated.
You are mapping the {{Line Items []: Meta Data}} array to get a value, where the id is 489. But this ID field does not exist in this array. Do you see where this might go wrong?
You are one array too deep. Try to map the {{Line items[]}} array and use dot notation to access the value. So map array with value {{Meta Data.value}}, where ID is 489. Something like this:
Can I recommend some viewing of my Make for Make Newbies video series here in the community? I think it will help you greatly when dealing with data structures. It starts out really easy and covers a ton of the sort of work you’ll be doing when extracting values out of arrays and collections. All you have to do is watch the video and I provide you the scenarios you can use to follow along and practice.
I started watching it. It’s helpful. I’m still a little stuck though. Do I need JSON in my scenario?? Because I’m not sure how to integrate JSON. My current scenario is only using woocommerce and google sheets. I thought for a while I needed an iterator between them, but I couldn’t figure that out either. So far your videos are working with JSON and you don’t cover that. Maybe you do later.
I’m pretty sure I have a complex array, now it’s just a matter of figuring out how to tell it which array and sub array and key values.
Oh don’t do that. Just try to be patient. I use parse json to simulate the data you may get from another module. You definitely don’t need to use it unless you want to experiment generating similar structures that are generated by other app modules.
In the end it’s all json going into and out of each module, every single time.