How to parse and form a json with a nested array

join shbcf.ru