Write json as array