Edited item controller to output json