Skip to content

Instantly share code, notes, and snippets.

@creativecreatorormaybenot
Created July 25, 2019 19:04
Show Gist options
  • Save creativecreatorormaybenot/5d163a88142aea40ddb67cba56fe7f93 to your computer and use it in GitHub Desktop.
Save creativecreatorormaybenot/5d163a88142aea40ddb67cba56fe7f93 to your computer and use it in GitHub Desktop.
JSON decoding
import 'dart:convert';
void main() {
final String string = '[{"name": "Dart", "value": 1}]';
final data = jsonDecode(string);
print(data[0]['name']);
print(data[0]['value']);
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment