matching up JSON from controller to JS