added converting from array to json record