Re: dump all object keys/values
By: Nightfox to Mortifis on Wed Apr 08 2020 12:29 pm
Re: dump all object keys/values
By: Mortifis to All on Wed Apr 08 2020 01:42 am
How would one show all of the key/values for http_request.query?
To print out the key/values of an object, I usually like to do this (this example assumes it's being run on the telnet terminal:
for (var prop in http_request.query)
console.print(prop + ": " + http_request.query[prop] + "\r\n"); console.pause();
JSON.stringify() does seem easier though:
console.print(lfexpand(JSON.stringify(http_request.query, null, 4)));
digital man
Synchronet "Real Fact" #88:
SBBSecho v3.00 was first committed to cvs.synchro.net on Apr-11-2016.
Norco, CA WX: 54.1°F, 68.0% humidity, 7 mph NNE wind, 0.78 inches rain/24hrs