Added decoding of json to array