Skip to content

Armstrongest

Programming, Patterns, and Paradox

  • Code
  • Musings
  • Design
  • Contact

Tag: json

Flatten a hierarchical JSON object into a table

Posted on March 1, 2017 by Gary Armstrong

Recently I had a requirement to take a list of JSON objects that had a hierarchical structure and represent it as a table. For reference, here’s a sample of what the JSON object looked something like. If you want to try on your own, feel free to copy below. [{ “ProductVariants”: [{ “Images”: [{ “ImageTypeID”: 27, […]

Posted in Code Tagged javacript, json, recursion, typeof Leave a comment

Recent Articles

  • PHP 7 and the Null Coalescing Operator ?? April 27, 2019
  • How Get all WordPress posts that have a custom field January 7, 2019
  • How to get posts that do NOT have a custom field value December 13, 2018

Archives

  • April 2019 (1)
  • January 2019 (1)
  • December 2018 (1)
  • May 2017 (2)
  • April 2017 (2)
  • March 2017 (1)
  • February 2017 (1)
  • January 2017 (4)
  • October 2016 (1)
  • September 2016 (3)
  • August 2016 (1)

Categories

  • Code (17)
  • Design (1)
  • Lab (1)
  • Musings (7)
  • Snippets (1)
  • WordPress (9)
Proudly powered by WordPress | Theme: armstrongest by Gary Armstrong.