I have a datastream as JSON, I want to parse it and want to save result in ini-file :
{
"books": [{
"id": "1",
"date": "2017-03-12",
"date_text": "sunday 12 march",
"title": "title text"
}, {
"id": "2",
"date": "2017-03-12",
"date_text": "sunday 12 march",
"title": "title text"
}]
}
This is my sample data and I would like to know if there is a way to save it into a file no matter if it contain 1 or more "id:s" (Items) I know how to parse the JSON but not how to save it down to a file in correct format for an ini.
Preferable format:
[Books 0]
id= 1
date= 2017-03-12
date_text=sunday 12 march
title= title text
[Books 1]
id"=2
date=2017-03-12
date_text=sunday 12 march
title=title text