Skip to content
Advertisement

Tag: group

How to group a json by a nested key using Python?

Lets say we have a json object in Python: What is the most efficient way to group this data by city, so that we end up with a json in which we group the data by city such that we end up with a json as: … in which the content of the people are included in “people” key. Thanks!

Advertisement