Modifying JSON
JSON retrieved from a JSON feed is always going to be read-only; as such data feeds do not provide functionality to modify their data from unverified sources. There are many cases where we would want to ingest the data from an external data feed, and then modify that content as per our requirements. An example is a company that is using a data feed that is being supplied by a data vendor, but the data that is being provided is a lot more than the company requires. In such cases, rather than using the whole feed, the company would only extract a part of it, perform certain operations to modify it as per their requirements, and reuse the new JSON object. Let us take our employee
JSON feed. Assume that the name of the company was different during different periods. We want to group the employees by company name, which is based on when they joined. Employees who joined the company before 1987 belong to Company 1 and those who joined the company in 1987 or after belong to Company...