Using Variables for Column Names when Querying Parse.com Database -


i have 2 parse.com classes. retrieve array of values class1. values names of parse.com columns in class2. after retrieving desired object class2, want loop through getting appropriate columns in class2 this:

        parse.initialize("ksuhcunt9pkskvyrwxael", "yklwdybk6wamopc");     var checkwait = parse.object.extend("checkwait");     var query = new parse.query(checkwait);         query.equalto("objectid", "omp9qf7maj");     query.first({     success: function(object) {     $(".success").show();       var test = object.get("myarray[1]");         }, 

ok. so, if replace myarray[1] appropriate column name, retrieved desired data. tested value contained in myarray[1] , contain correct column name. if set variable = myarray[1] parse.com still returns "undefined".

if contents of myarray[1] string "nickname", following equivalent:

var nick1 = object.get("nickname"); var nick2 = object.get(myarray[1]); 

the issue passed string "myarray[1]" instead of expression myarray[1].


Comments

Popular posts from this blog

css - Which browser returns the correct result for getBoundingClientRect of an SVG element? -

gcc - Calling fftR4() in c from assembly -

.htaccess - Matching full URL in RewriteCond -