This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| const obj = [{ "name": "John", "age": 30, "city": "New York", "country": "USA", "Hobbies": ["reading", "swimming", "hiking", "swimming"], "occupation": "programmer", "favorite_foods": { "Breakfast": "pancakes", "Lunch": "", "dinner": "pasta", "Snack": "" }, "gear": { "type": "", "material": "", "color": null }, "affiliations": ["", "", ""], "friends": [{ "name": "Jane", "age": 28, "city": "New York", "country": "USA", "occupation": null }, { "name": "Tom", "age": 32, "city": "London", "country ": "UK", "occupation": "teacher" }, { "name": "Jane", "age": 28, "city": "NewYork", "country": "USA", "occupation": null }] }]; | |
| class ObjectSorted { | |
| constructor() { | |
| this.keySet = []; | |
| this.objectStore = {} | |
| } | |
| set(key, value) { | |
| if (value) { |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| //{ Driver Code Starts | |
| //Initial Template for Java | |
| import java.util.*; | |
| import java.lang.*; | |
| import java.io.*; | |
| class GFG{ | |
| public static void main(String args[]) throws IOException{ | |
| Scanner sc=new Scanner(System.in); |