deep_pick 0.1.1 deep_pick: ^0.1.1 copied to clipboard
A library to access deep nested values inside of dart data structures, like returned from `dynamic jsonDecode(String source)`.
example/deep_pick_example.dart
import 'dart:convert';
import 'package:deep_pick/deep_pick.dart';
void main() {
final json = jsonDecode('''
{
"shoes": [
{
"id": "421",
"name": "Nike Zoom Fly 3"
}
]
}
''');
final name = parseJsonToString(json, 'shoes', 0, 'name');
print(name); // Nike Zoom Fly 3
final id = parseJsonToInt(json, 'shoes', 0, 'id');
print(id); // 421
}