Creating json file from array

all in the title