# Json structure without keys

**URL:** <https://discuss.jsonapi.org/t/json-structure-without-keys/2155>\
**Category:** Uncategorized\
**Created:** [February 21, 2021, 1:38pm UTC](https://discuss.jsonapi.org/t/json-structure-without-keys/2155 "2021-02-21T13:38:45Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![wagmun](https://avatars.discourse-cdn.com/v4/letter/w/85e7bf/32.png) [@wagmun](https://discuss.jsonapi.org/u/wagmun)\
**Post date:** [February 21, 2021, 1:38pm UTC](https://discuss.jsonapi.org/t/json-structure-without-keys/2155/1 "2021-02-21T13:38:45Z")

</div>

Hi.  
I’m new to json.  
I downloaded some information in json format, but it looks different from what I’ve seen in my searches.  
The basic structures consists of two objects: an array of arrays without keys and an array of objects wiht key:value pairs.

{  
“resultset”: [  
[  
“value0”,  
“value1”,  
“value2”,  
“value3”,  
“value4”,  
“value5”,  
“value6”,  
“value7”,  
“value8”  
],  
[  
“value0”,  
“value1”,  
“value2”,  
“value3”,  
“value4”,  
“value5”,  
“value6”,  
“value7”,  
“value8”  
],  
\<…\>  
[  
“value0”,  
“value1”,  
“value2”,  
“value3”,  
“value4”,  
“value5”,  
“value6”,  
“value7”,  
“value8”  
]  
],  
“metadata”: [  
{  
“colIndex”: 0,  
“colType”: “String”,  
“colName”: “key0”  
},  
{  
“colIndex”: 1,  
“colType”: “String”,  
“colName”: “Key1”  
},  
{  
“colIndex”: 2,  
“colType”: “String”,  
“colName”: “Key2”  
},  
{  
“colIndex”: 3,  
“colType”: “String”,  
“colName”: “Key3”  
},  
{  
“colIndex”: 4,  
“colType”: “String”,  
“colName”: “Key4”  
},  
{  
“colIndex”: 5,  
“colType”: “String”,  
“colName”: “Key5”  
},  
{  
“colIndex”: 6,  
“colType”: “String”,  
“colName”: “Key6”  
},  
{  
“colIndex”: 7,  
“colType”: “Numeric”,  
“colName”: “Key7”  
},  
{  
“colIndex”: 8,  
“colType”: “Numeric”,  
“colName”: “Key8”  
}  
]  
}

Never seen this structure before. It’s a json object whi only two values: the first one looks like the values of a key:value pair, and the second one looks is an array of objects containg the description of each key value. I searched over the web trying to find similar structure with no success.Very weird.  
How do I treat this object? How do I create a struct for those variables in Swift and how to parse that?

Thanks a lot!  
wagmun

---

<div class="post-metadata">

**Author:** ![claudenirmf](https://sea2.discourse-cdn.com/flex016/user_avatar/discuss.jsonapi.org/claudenirmf/32/714_2.png) [@claudenirmf](https://discuss.jsonapi.org/u/claudenirmf)\
**Post date:** [February 22, 2021, 7:24pm UTC](https://discuss.jsonapi.org/t/json-structure-without-keys/2155/2 "2021-02-22T19:24:26Z")

</div>

Hi @wagmun, welcome to JSON.

Unfortunately, this forum is not the right place for your question as it is dedicated to the [JSON:API specification](https://jsonapi.org/), a standard for people to exchange JSON without having to re-invent formats and field names (TL;DR).

I suggest that you have a look at Stack Overflow instead, more specifically questions about “how to parse JSON in Swift”. Once you can read your message in Swift, you’ll be able to write a algorithm to process it. Also, let people know the context, maybe there is already an algorithm for that.
