Created
October 7, 2019 10:09
-
-
Save iapicca/7b94427c4e5922b13d2649603628e6d3 to your computer and use it in GitHub Desktop.
Json Decode
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import 'dart:convert'; | |
const String _object_key = 'object'; | |
const String _subset_key = 'subset'; | |
const String _json = '{"object": [{"subset":"hello"},{"subset":" "},{"subset":"world"}]}'; | |
void main() => print(jsonDecode(_json)[_object_key].map((d)=> d[_subset_key] as String).join()); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
simple example of decoding a json