Hello People, I am doing an Items Search API call...
# suitecommerce
a
Hello People, I am doing an Items Search API call to fetch details of matrix child item. The images detail in response contains the detail for all children of that matrix item. Is it possible to get image details of a specific matrix child item?
c
Is the issue that it's difficult to parse the images detail response or that you want to minimize the size of the api call?
a
Parsing the desired image from images detail
c
The
Utils
module has a function named
imageFlatten
that takes the
item_images
object as a parameter and returns an array that is much easier to deal with. If you include it in your
define
then you can use it in your extension.
a
Oh I didn't know about that. Thank you @Chris. I'll check that out.
👍🏻 1
Hey, I can't see any imageFlatten method in extensibility API documentation for Utils. Can you please guide me to the docs?
c
Use this in dev tools:
let utils = require('Utils');
View the object that it returned.