Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR JAVASCRIPT

flutter access json object inside object

myJson = {
  "label": "This is a string",
  "value": {
  	"address": "This is a string",
    "country": "This is a string"
  }
}

//to access address field
var decodedJson = json.decode(myJson);
var jsonValue = json.decode(decodedJson['value']);
print(jsonValue['address']);
 
PREVIOUS NEXT
Tagged: #flutter #access #json #object #object
ADD COMMENT
Topic
Name
5+5 =