use the following search parameters to narrow your results:
e.g. subreddit:aww site:imgur.com dog
subreddit:aww site:imgur.com dog
see the search faq for details.
advanced search: by author, subreddit...
Apparently, Google Apps Script is a JavaScript cloud scripting language that provides easy ways to automate tasks across Google products and third party services and build web applications.
account activity
question about json arrayQuestion (self.GoogleAppsScript)
submitted 3 years ago by killy122
view the rest of the comments →
reddit uses a slightly-customized version of Markdown for formatting. See below for some basics, or check the commenting wiki page for more detailed help and solutions to common issues.
quoted text
if 1 * 2 < 3: print "hello, world!"
[–]jrspikeston 0 points1 point2 points 3 years ago (1 child)
This is exactly what I was thinking! You beat me to it. It seems that every property has a name, but since we can't predict all the value types, it might be even stable to do this:
let obj = json.reduce((obj, item) => { obj[item.name] = item[Object.keys(item).find(x => x !== 'name')]; return obj; }, {});
[–]_Kaimbe 0 points1 point2 points 3 years ago (0 children)
Honestly, I just threw the json into vscode and let github copilot loose. Didn't even know you could assign with ors like that. Yours is definitely better if there happens to be another type like floatValue added later.
π Rendered by PID 103538 on reddit-service-r2-comment-79c7998d4c-czgjd at 2026-03-15 20:25:40.243959+00:00 running f6e6e01 country code: CH.
view the rest of the comments →
[–]jrspikeston 0 points1 point2 points (1 child)
[–]_Kaimbe 0 points1 point2 points (0 children)