adding json solution from @matt-e-king