Fixing a json array parsing issue