Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- /**
- * Created by Lusien.GG on 17-06-16.
- */
- 'use strict'
- function parseJSON(input) {
- let collection =[]
- for (let i=0; i < input.length; i++){
- collection.push(JSON.parse(input[i]))
- }
- for (let obj of collection){
- console.log(`Name: ${obj.name}`)
- console.log(`Age: ${obj.age}`)
- console.log(`Date: ${obj.date}`)
- }
- }
- // parseJSON(['{"name":"Gosho","age":10,"date":"19/06/2005"}',
- // '{"name":"Tosho","age":11,"date":"04/04/2005"}'])
Advertisement
Add Comment
Please, Sign In to add comment