I have a Parse cloud-code function that is resident in Heroku. I want to create a Parse object from the json that is passed to Heroku, so I'm using the Parse.Object fromJSON() function to try to do this:
var Vendor = Parse.Object.extend("Vendor");
var vendor = new Vendor();
var myVendor = vendor.fromJSON(json);
The above code fails at the final line, with the error message:
2015-12-01T02:18:05.446656+00:00 app[web.1]: var myVendor = vendor.fromJSON(json);
2015-12-01T02:18:05.446656+00:00 app[web.1]: ^
2015-12-01T02:18:05.446657+00:00 app[web.1]: TypeError: undefined is not a function.
Any ideas why I can't get this function working?
.fromJSON()in the JSON object (docs: parse.com/docs/js/api/classes/…), but I can't help you any more... I have no experience in Parse..fromJSON()"in the JSON object"var myVendor = Parse.Object.fromJSON(json)var user = Parse.Object.fromJSON(json);Undefined is not a function.