Look at the JSON being returned: it's not an array, it's a single object:
{
"success": 1,
"product": {
"name": "...",
"tags": [
"..."
],
"options": {
"...": {
"label": "...",
"price": {
"value": ...,
"currency": {
"code": "...",
"symbol": "...",
"format": "..."
}
},
"old_price": {
"value": ...,
"currency": {
"code": "...",
"symbol": "...",
"format": "..."
}
}
},
...
},
"discount": {
"amount": "...",
"end_date": "..."
},
"gallery": [
{
"main": "..."
}
],
"shipping": {
"method": {
"country": "...",
"title": "...",
"shipping_time": {
"value": "...",
"info": "..."
},
"cost": {
"value": ...,
"currency": {
"code": "...",
"symbol": "...",
"format": "..."
}
}
},
"lead_time": {
"value": "...",
"info": "..."
},
"props": {
"ready_to_ship": true,
"in_stock": true,
"fast_dispatch": true
}
},
"reviews": {
"rating": "...",
"count": ...,
"total_buyers": ...
}
}
}
Your
items
variable contains a single object, which does not have
a map
method[
^].
And with the exception of the
tags
and
gallery
properties, there's nothing in that object which would be represented as an array either.