Write a function which can take a random JSON and transform the data into multiple line human readable title value pairs.
For example:
Given JSON
{
university: 'Oxford',
batch: '2019-2020',
address: {
street: '144 Main',
city: 'London',
country: 'UK',
contact: {
fax: 'XXXXXX',
phone: 'YYYYY'
}
},
students: [{
name: 'Jon Doe',
age: '22'
},{
name: 'Mike Wilson',
age: '32'
},{
name: 'David',
age: '28'
}]
}
Output:
university: Oxford
batch: 2019-2020
address street: 144 Main
address city: London
address country: UK
address contact fax: XXXXXX
address contact phone: YYYYY
students 1 name: Jon Doe
students 1 age: 22
students 2 name: Mike Wilson
students 2 age: 32
students 3 name: David
students 3 name: 28