I have a csv file similar to this
"name.firstName","name.givenName","name.DisplayName","phone.type","phone.value" "john","maverick","John Maverick","mobile","123-123-123" "jim","lasher","Jim Lasher","mobile","123-123-123"
I want to convert 2nd and 3rd lines to JSON objects. Uses the first line as the title. Thus, the result will be
[ { "name": { "firstName": "john", "givenName": "maverick", "DisplayName": "John Maverick" }, "phone": { "type": "mobile", "value": "123-123-123" } }, { "name": { "firstName": "john", "givenName": "maverick", "DisplayName": "John Maverick" }, "phone": { "type": "mobile", "value": "123-123-123" } ]
Any idea how to achieve this?
source share