shareInfo here is controlled by the API being called. It can be anything and any type.
The API you are calling would have made this an array because there might be possibility of sending more than one items or something planned for future.
Its out of scope of Wappler or any API calling function (xhr/fetch) to modify the value returned from an called API - it would actually be a data-integrity and security issue if such a thing was to happen.
What I’m asking for is something similar to the Single Database Query which basically just says the query is only going to return one value so remove the [0] . It’s not at all changing what the API is returning, only how it is accessed in Wappler. There are many cases where it is a known that only one record is going to be returned from the API. In this instance it’s a Google Album which is requested by the Shared Album ID. There literally can be only one.
I do understand your request. But its not something that is logical for 3rd party APIs.
Even though it can literally just be one, its on Google to not share it as an array. If Google is returning an array, [0] is the only and right way to deal with it from what I know.