I'm having a tough time trying to work out formula for the Array types
I'm working on old VB6 2008 not using any JSON functions.
i can easily work with '{' & '}' because '{' have names like 'happy:{' or 'networth:{'
I use VBs Dictionary function to store the API Tree like Dictionay.Add(key, item)
example:
"stocks":{
"1574420":{
"stock_id":17
"shares":100000
"bought_price":229.5314
"time_bought":1275511646
"time_listed":0
}
When Iv added the keys and items to Dictionary they look like this
example:Dictionary(keys,items)
- Dictionary("stocks", "")
- Dictionary("stocks.1574420", "")
- Dictionary("stocks.1574420.stock_id", "17")
- Dictionary("stocks.1574420.shares", "100000")
- ....
- Dictionary.Exist("stocks.1574420.stock_id")
BUT with Array Types there are no Keys to collect only the one
"bazaar":[{
"ID":396
"name":"Business Class Ticket"
"type":"Special"
"quantity":1
"price":25500000
"market_price":8050000
}
{
"ID":206
"name":"Xanax"
"type":"Drug"
"quantity":30
"price":862862
"market_price":860000
}
]
i can't make a reference to bazaar.ID because there would be two under the same Key("bazaar")
example: Dictionary(keys,items)
- Dictionary("bazaar", "")
- Dictionary("bazaar.ID", "396")
- Dictionary("bazaar.name", "Business Class Ticket")
- Dictionary("bazaar.type", "Special")
- .....
- Dictionary("bazaar", "")
- Dictionary("bazaar.ID", "206")
- Dictionary("bazaar.name", "Xanax")
- Dictionary("bazaar.type", "Drug")
- .....