omegastripes / VBA-JSON-parser

Backus-Naur Form JSON Parser based on RegEx for VBA
GNU General Public License v3.0
107 stars 44 forks source link

vJSON.Item is failing #8

Closed manavilai closed 5 years ago

manavilai commented 5 years ago

i have a simple json file.. {"employee" : {"name" :"vivek"}} i am trying to retrieve the employee from this json. i do the below command JSON.Parse sJSONString, vJSON, sState and later do sCont = vJSON("employee")

i get the below error. please help

image

omegastripes commented 5 years ago

Hi @manavilai Try sCont = vJSON("employee")("name") or Set sCont = vJSON("employee")

omegastripes commented 5 years ago

Hi @manavilai Have you tried the code? Does it work for you?

manavilai commented 5 years ago

hi @omegastripes ,

thank you so much it works for me

regards, manavilai