Reputation: 198
{"dynamic_link_data":{"data":{"referralCode":"1234"}}}
How to get referralCode inside data. I m not able to fetch referralCode from response.
Upvotes: 1
Views: 41
Reputation: 17940
If you have only one dynamic_link_data
and also one data
, you can try this:
var test = {"dynamic_link_data":{"data":{"referralCode":"1234"}}};
if (test.isNotEmpty && test.entries.first.value.isNotEmpty) {
print(test.entries.first.value.entries.first.value['referralCode']);
}
Upvotes: 1