Created
February 7, 2020 15:26
-
-
Save fabiancrx/6ef0374a9f5f43fe7b859d09301a7b33 to your computer and use it in GitHub Desktop.
This file contains hidden or 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'; | |
void main() { | |
String dataString = """[ | |
{ | |
"placeImage":"images/fish2.jpg", | |
"placeName":"Ikan 2", | |
"placeItem":["fish, crab, seafood"], | |
"minOrder":20 | |
} | |
]"""; | |
List<dynamic> dataJSON = jsonDecode(dataString); | |
dataJSON.forEach((object) { | |
String finalString=""; | |
List<dynamic> dataList = object["placeItem"]; | |
dataList.forEach((item) { | |
print(item); | |
finalString = finalString + item + " | "; | |
}); | |
}); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment