{"id":4290,"date":"2021-05-19T11:25:21","date_gmt":"2021-05-19T11:25:21","guid":{"rendered":"https:\/\/codethataint.com\/blog\/?p=4290"},"modified":"2024-08-01T12:30:17","modified_gmt":"2024-08-01T12:30:17","slug":"real-time-example-using-lambda-functions","status":"publish","type":"post","link":"https:\/\/codethataint.com\/blog\/real-time-example-using-lambda-functions\/","title":{"rendered":"Real Time Example Using Lambda Functions"},"content":{"rendered":"<p>We have a Employee Object with following fields &#8211; <em>empId,salary,empAge,totalExp,empName,location,pincode<\/em>. Now we are going to do following operations in the List containing Employee Object.<\/p>\n<pre class=\"brush: java; title: ; notranslate\" title=\"\">\r\nimport java.util.*;\r\nimport java.util.function.Predicate;\r\nimport java.util.stream.Collectors;\r\n\r\npublic class MatchEgs {\r\n    public static void main(String&#x5B;] args) {\r\n        Employee objEmp1 = new Employee(101, &quot;Mugil&quot;, 30, &quot;Chennai&quot;, &quot;600018&quot;, 5, 5000);\r\n        Employee objEmp2 = new Employee(102, &quot;Mani&quot;, 33, &quot;Chennai&quot;, &quot;600028&quot;, 4, 6000);\r\n        Employee objEmp3 = new Employee(103, &quot;Madhu&quot;, 32, &quot;Chennai&quot;, &quot;600054&quot;, 6, 10000);\r\n        Employee objEmp4 = new Employee(104, &quot;Vinu&quot;, 29, &quot;Bangalore&quot;, &quot;500234&quot;, 5, 15000);\r\n        Employee objEmp5 = new Employee(105, &quot;Srini&quot;, 40, &quot;Delhi&quot;, &quot;622142&quot;, 10, 7000);\r\n        Employee objEmp6 = new Employee(106, &quot;Dimple&quot;, 35, &quot;Delhi&quot;, &quot;622142&quot;, 5, 8000);\r\n\r\n        List&lt;Employee&gt; arrEmployee = Arrays.asList(objEmp1, objEmp2, objEmp3, objEmp4, objEmp5, objEmp6);\r\n }\r\n}\r\n<\/pre>\n<p>Check if people match the criteria by passing predicate to <strong>anyMatch, noneMatch and allMatch<\/strong><\/p>\n<pre class=\"brush: java; title: ; notranslate\" title=\"\">\r\n        Predicate&lt;Employee&gt; empAgeGreaterThan35 = employee -&gt; employee.getEmpAge() &gt; 35;\r\n        Predicate&lt;Employee&gt; empAgeGreaterThan30 = employee -&gt; employee.getEmpAge() &gt; 30;\r\n        Predicate&lt;Employee&gt; empStayingInDelhi   = employee -&gt; employee.getLocation().equals(&quot;Delhi&quot;);\r\n\r\n        \/\/Check if Some Employee Age is Greater 30\r\n        System.out.println(arrEmployee.stream().anyMatch(empAgeGreaterThan35));\r\n\r\n        \/\/Check if all Employee Age is above 30\r\n        System.out.println(arrEmployee.stream().allMatch(empAgeGreaterThan30));\r\n\r\n        \/\/Check if any Employee Location in Delhi\r\n        System.out.println(arrEmployee.stream().noneMatch(empStayingInDelhi));\r\n<\/pre>\n<p>Sort Employee by Name passing Comparator using <strong>Sorted<\/strong> and <strong>reversed<\/strong>. Sort based on more than<br \/>\none field using <strong>thenComparing<\/strong><\/p>\n<pre class=\"brush: java; title: ; notranslate\" title=\"\">\r\n        Comparator&lt;Employee&gt; sortByName = Comparator.comparing(Employee::getEmpName);\r\n        List&lt;Employee&gt; arrSortedByName = arrEmployee.stream()\r\n                                                    .sorted(sortByName)\r\n                                                    .collect(Collectors.toList());\r\n        System.out.println(&quot;----------------Sorted By Name----------------&quot;);\r\n        arrSortedByName.forEach(employee -&gt; System.out.println(employee));\r\n\r\n        Comparator&lt;Employee&gt; sortByNameReversed = Comparator.comparing(Employee::getEmpName).reversed();\r\n        List&lt;Employee&gt; arrSortedByNameRev = arrEmployee.stream()\r\n                                                       .sorted(sortByNameReversed)\r\n                                                       .collect(Collectors.toList());\r\n        System.out.println(&quot;----------------Sorted By Name Reversed----------------&quot;);\r\n        arrSortedByNameRev.forEach(employee -&gt; System.out.println(employee));\r\n\r\n        Comparator&lt;Employee&gt; sortByNameanAge = Comparator.comparing(Employee::getEmpName).thenComparing(Employee::getEmpAge);\r\n        List&lt;Employee&gt; arrSortedByNameAge = arrEmployee.stream()\r\n                                                       .sorted(sortByNameanAge)\r\n                                                       .collect(Collectors.toList());\r\n        System.out.println(&quot;----------------Sorted By Name and Age----------------&quot;);\r\n        arrSortedByNameAge.forEach(employee -&gt; System.out.println(employee));\r\n<\/pre>\n<p>Limit and Skip records using <strong>limit <\/strong>and <strong>skip<\/strong><\/p>\n<pre class=\"brush: java; title: ; notranslate\" title=\"\">\r\n        System.out.println(&quot;----------------Limit Records to 3 ----------------&quot;);\r\n        List&lt;Employee&gt; arrEmp3 =  arrEmployee.stream()\r\n                                             .limit(3)\r\n                                             .collect(Collectors.toList());\r\n        arrEmp3.forEach(employee -&gt; System.out.println(employee));\r\n\r\n        System.out.println(&quot;----------------Skip First 3 Records ----------------&quot;);\r\n        List&lt;Employee&gt; arrEmp4 =  arrEmployee.stream()\r\n                                             .skip(3)\r\n                                             .collect(Collectors.toList());\r\n        arrEmp4.forEach(employee -&gt; System.out.println(employee));\r\n<\/pre>\n<p>doWhile when condition is true using <strong>takeWhile<\/strong> and vice-versa(Until condition is met) using <strong>dropWhile<\/strong><\/p>\n<pre class=\"brush: java; title: ; notranslate\" title=\"\">\r\n        System.out.println(&quot;----------------Print Records until Chennai - Keeps printing until condition is True----------------&quot;);\r\n        List&lt;Employee&gt; arrEmp5 =  arrEmployee.stream()\r\n                                             .takeWhile(employee -&gt; employee.getLocation().equals(&quot;Chennai&quot;))\r\n                                             .collect(Collectors.toList());\r\n        arrEmp5.forEach(employee -&gt; System.out.println(employee));\r\n\r\n        System.out.println(&quot;----------------Print Records until Chennai - Stops printing when condition is Met ----------------&quot;);\r\n        List&lt;Employee&gt; arrEmp6 =  arrEmployee.stream()\r\n                                             .dropWhile(employee -&gt; employee.getLocation().equals(&quot;Bangalore&quot;))\r\n                                             .collect(Collectors.toList());\r\n        arrEmp5.forEach(employee -&gt; System.out.println(employee));\r\n<\/pre>\n<p>Get Minimum and Maximum age of employee using <strong>min <\/strong>and <strong>max<\/strong>. The List should be sorted first using comparator. Similarly get Employee with max experience in a particular location using predicate, comparator and max.<\/p>\n<pre class=\"brush: java; title: ; notranslate\" title=\"\">\r\n        System.out.println(&quot;----------------Record with Min and Max Value ----------------&quot;);\r\n        Comparator&lt;Employee&gt; sortByAge = Comparator.comparing(Employee::getEmpAge);\r\n        List&lt;Employee&gt; arrEmp7 =  arrEmployee.stream()\r\n                                             .min(sortByAge)\r\n                                             .stream()\r\n                                             .collect(Collectors.toList());\r\n        List&lt;Employee&gt; arrEmp8 =  arrEmployee.stream()\r\n                                             .max(sortByAge)\r\n                                             .stream()\r\n                                             .collect(Collectors.toList());\r\n        arrEmp7.forEach(employee -&gt; System.out.println(employee));\r\n        arrEmp8.forEach(employee -&gt; System.out.println(employee));\r\n\r\n        System.out.println(&quot;----------------Get Employee with Max Exp in Chennai ----------------&quot;);\r\n        Predicate&lt;Employee&gt; filterEmpInChennai = employee -&gt; employee.getLocation().equals(&quot;Chennai&quot;);\r\n        Comparator&lt;Employee&gt; sortByExp = Comparator.comparing(Employee::getTotalExp);\r\n        List&lt;Employee&gt; arrEmp11 =  arrEmployee.stream()\r\n                                              .filter(filterEmpInChennai)\r\n                                              .max(sortByExp)\r\n                                              .stream()\r\n                                              .collect(Collectors.toList());\r\n        arrEmp11.forEach(employee -&gt; System.out.println(employee));\r\n<\/pre>\n<p><strong>FindFirst<\/strong> Employee who matches criteria and <strong>FindAny <\/strong> who matches criteria. Both takes predicate as input.<\/p>\n<p><em>findAny<\/em> &#8211; Returns an Optional describing some element of the stream, or an empty Optional if the stream is empty.it is free to select any element in the stream. This is to allow for maximal performance in parallel operations;<\/p>\n<pre class=\"brush: java; title: ; notranslate\" title=\"\">\r\n        System.out.println(&quot;----------------Find First  ----------------&quot;);\r\n        Predicate&lt;Employee&gt; empStayingInChennai = employee -&gt; employee.getLocation().equals(&quot;Chennai&quot;);\r\n        List&lt;Employee&gt; arrEmp9 =  arrEmployee.stream()\r\n                                             .filter(empStayingInChennai)\r\n                                             .findFirst()\r\n                                             .stream()\r\n                                             .collect(Collectors.toList());\r\n\r\n        arrEmp9.forEach(employee -&gt; System.out.println(employee));\r\n\r\n        System.out.println(&quot;----------------Find Any  ----------------&quot;);\r\n        List&lt;Employee&gt; arrEmp10 =  arrEmployee.stream()\r\n                                              .filter(empAgeGreaterThan30)\r\n                                              .findAny()\r\n                                              .stream()\r\n                                              .collect(Collectors.toList());\r\n        arrEmp10.forEach(employee -&gt; System.out.println(employee));\r\n<\/pre>\n<p>Get the Sum of salary of Employees in Location(Chennai) using <strong>sum<\/strong><\/p>\n<pre class=\"brush: java; title: ; notranslate\" title=\"\">\r\n         System.out.println(&quot;----------------Sum - Get Sum of Salary in Chennai  ----------------&quot;);\r\n        \/\/Method 1\r\n        Integer empTotalSalaryInChennai1 = arrEmployee.stream()\r\n                                                      .filter(empStayingInChennai)\r\n                                                      .map(employee -&gt; employee.getSalary())\r\n                                                      .collect(Collectors.toList())\r\n                                                      .stream()\r\n                                                      .reduce(0, Integer::sum);\r\n        System.out.println(&quot;Sum of Empl Salary - Chennai &quot; + empTotalSalaryInChennai1);\r\n\r\n        \/\/Method 2\r\n        Integer empTotalSalaryInChennai2 = arrEmployee.stream()\r\n                                                      .filter(empStayingInChennai)\r\n                                                      .mapToInt(Employee::getSalary).sum();\r\n        System.out.println(&quot;Sum of Empl Salary - Chennai &quot; + empTotalSalaryInChennai2);\r\n\r\n        \/\/Method 3\r\n        Integer empTotalSalaryInChennai3 = arrEmployee.stream() \r\n                                                      .filter(empStayingInChennai)\r\n                                                      .map(employee -&gt; employee.getSalary())\r\n                                                      .collect(Collectors.summingInt(Integer::intValue));\r\n        System.out.println(&quot;Sum of Empl Salary - Chennai &quot; + empTotalSalaryInChennai3);\r\n<\/pre>\n<p>Get Max and Min salary of employee <\/p>\n<pre class=\"brush: java; title: ; notranslate\" title=\"\">\r\n  Comparator&lt;Employee&gt; cmpSalComp = (Employee objEmpp1, Employee objEmpp2) -&gt; Double.compare(objEmpp1.Salary,objEmpp2.Salary);\r\n\r\n  Employee empMaxObj = arrEmpl.stream()\r\n                                   .max(cmpSalComp)\r\n                                   .get();\r\n                                   \r\n  Employee empMinObj =   arrEmpl.stream()\r\n                                 .min(cmpSalComp)\r\n                                 .get();\r\n<\/pre>\n<p>Get Average salary of employee grouped by Location<\/p>\n<pre class=\"brush: java; title: ; notranslate\" title=\"\">\r\n        System.out.println(&quot;----------------Average - Grouped by Location  ----------------&quot;);\r\n        Map&lt;String, Double&gt; arrAvgSalByLoc =  arrEmpl.stream()\r\n                                                     .collect(Collectors.groupingBy(Employee::getLocation, Collectors.averagingDouble(Employee::getSalary)));\r\n                                         \r\n        System.out.print(arrAvgSalByLoc);\r\n<\/pre>\n<p>Get Average salary of employee in location using <strong>average<\/strong><\/p>\n<pre class=\"brush: java; title: ; notranslate\" title=\"\">\r\n        System.out.println(&quot;----------------Average - Get Average of Salary in Chennai  ----------------&quot;);\r\n        OptionalDouble empAvgSalaryInChennai = arrEmployee.stream()\r\n                                                          .filter(empStayingInChennai)\r\n                                                          .mapToInt(Employee::getSalary)\r\n                                                          .average();\r\n        System.out.println(&quot;Average Salary of Employee - Chennai &quot; + empAvgSalaryInChennai);\r\n<\/pre>\n<p>Get List of Employees in a location using <strong>groupingBy<\/strong>. The Return type is hashmap with location as key and List of employees in value <\/p>\n<pre class=\"brush: java; title: ; notranslate\" title=\"\">\r\n        System.out.println(&quot;----------------Group By -  Get Employees grouped by Location  ----------------&quot;);\r\n        Map&lt;String, List&lt;Employee&gt;&gt; hmEmp13 = arrEmployee.stream()\r\n                                                         .collect(Collectors.groupingBy(Employee::getLocation));\r\n        hmEmp13.forEach((s, employees) -&gt; {\r\n            System.out.println(&quot;Employees from &quot;+ s);\r\n            employees.forEach(employee -&gt; System.out.println(employee));\r\n        });\r\n\r\n<\/pre>\n<p>Get Employee grouped by Location and getting Maximum Salary <strong>groupingBy <\/strong>and <strong>maxBy<\/strong><\/p>\n<pre class=\"brush: java; title: ; notranslate\" title=\"\">\r\n        System.out.println(&quot;----------------Group By -  Get Employees with Max Salary in Location  ----------------&quot;);\r\n        Comparator&lt;Employee&gt; cmprSalary = Comparator.comparing(Employee::getSalary);\r\n        Map&lt;String, Optional&lt;Employee&gt;&gt; hmEmp14 = arrEmployee.stream()\r\n                                                             .collect(Collectors.groupingBy(Employee::getLocation, Collectors.maxBy(cmprSalary)));\r\n\r\n        hmEmp14.forEach((s, employee) -&gt; {\r\n            System.out.print(&quot;Employee Location is &quot;+ s +  &quot; and salary is &quot;);\r\n            employee.ifPresent(emp -&gt; System.out.println(emp.getSalary()));\r\n        });\r\n<\/pre>\n<p>Get Employee Name using <strong>mapping<\/strong> grouped by Location using <strong>groupingBy<\/strong><\/p>\n<pre class=\"brush: java; title: ; notranslate\" title=\"\">\r\n        System.out.println(&quot;---------------- Employee at Location -  Using Collectors.mapping  ----------------&quot;);\r\n        Map&lt;String, List&lt;String&gt;&gt; hmEmp16 = arrEmployee.stream()\r\n                                                       .collect(Collectors.groupingBy(Employee::getLocation, Collectors.mapping(Employee::getEmpName, Collectors.toList())));\r\n\r\n        hmEmp16.forEach((s, employee) -&gt; {\r\n            System.out.println(&quot;Employee Name is &quot; + employee + &quot; and Location is &quot;+ s );\r\n\r\n        });\r\n<\/pre>\n<p><strong>Output<\/strong><\/p>\n<pre>\r\ntrue\r\nfalse\r\nfalse\r\n----------------Sorted By Name----------------\r\nEmployee{empId=106, empName='Dimple', empAge=35, totalExp=5, location='Delhi', pincode='622142', salary=8000}\r\nEmployee{empId=103, empName='Madhu', empAge=32, totalExp=6, location='Chennai', pincode='600054', salary=10000}\r\nEmployee{empId=102, empName='Mani', empAge=33, totalExp=4, location='Chennai', pincode='600028', salary=6000}\r\nEmployee{empId=101, empName='Mugil', empAge=30, totalExp=5, location='Chennai', pincode='600018', salary=5000}\r\nEmployee{empId=105, empName='Srini', empAge=40, totalExp=10, location='Delhi', pincode='622142', salary=7000}\r\nEmployee{empId=104, empName='Vinu', empAge=29, totalExp=5, location='Bangalore', pincode='500234', salary=15000}\r\n----------------Sorted By Name Reversed----------------\r\nEmployee{empId=104, empName='Vinu', empAge=29, totalExp=5, location='Bangalore', pincode='500234', salary=15000}\r\nEmployee{empId=105, empName='Srini', empAge=40, totalExp=10, location='Delhi', pincode='622142', salary=7000}\r\nEmployee{empId=101, empName='Mugil', empAge=30, totalExp=5, location='Chennai', pincode='600018', salary=5000}\r\nEmployee{empId=102, empName='Mani', empAge=33, totalExp=4, location='Chennai', pincode='600028', salary=6000}\r\nEmployee{empId=103, empName='Madhu', empAge=32, totalExp=6, location='Chennai', pincode='600054', salary=10000}\r\nEmployee{empId=106, empName='Dimple', empAge=35, totalExp=5, location='Delhi', pincode='622142', salary=8000}\r\n----------------Sorted By Name and Age----------------\r\nEmployee{empId=106, empName='Dimple', empAge=35, totalExp=5, location='Delhi', pincode='622142', salary=8000}\r\nEmployee{empId=103, empName='Madhu', empAge=32, totalExp=6, location='Chennai', pincode='600054', salary=10000}\r\nEmployee{empId=102, empName='Mani', empAge=33, totalExp=4, location='Chennai', pincode='600028', salary=6000}\r\nEmployee{empId=101, empName='Mugil', empAge=30, totalExp=5, location='Chennai', pincode='600018', salary=5000}\r\nEmployee{empId=105, empName='Srini', empAge=40, totalExp=10, location='Delhi', pincode='622142', salary=7000}\r\nEmployee{empId=104, empName='Vinu', empAge=29, totalExp=5, location='Bangalore', pincode='500234', salary=15000}\r\n----------------Limit Records to 3 ----------------\r\nEmployee{empId=101, empName='Mugil', empAge=30, totalExp=5, location='Chennai', pincode='600018', salary=5000}\r\nEmployee{empId=102, empName='Mani', empAge=33, totalExp=4, location='Chennai', pincode='600028', salary=6000}\r\nEmployee{empId=103, empName='Madhu', empAge=32, totalExp=6, location='Chennai', pincode='600054', salary=10000}\r\n----------------Skip First 3 Records ----------------\r\nEmployee{empId=104, empName='Vinu', empAge=29, totalExp=5, location='Bangalore', pincode='500234', salary=15000}\r\nEmployee{empId=105, empName='Srini', empAge=40, totalExp=10, location='Delhi', pincode='622142', salary=7000}\r\nEmployee{empId=106, empName='Dimple', empAge=35, totalExp=5, location='Delhi', pincode='622142', salary=8000}\r\n----------------Print Records until Chennai - Keeps printing until condition is True----------------\r\nEmployee{empId=101, empName='Mugil', empAge=30, totalExp=5, location='Chennai', pincode='600018', salary=5000}\r\nEmployee{empId=102, empName='Mani', empAge=33, totalExp=4, location='Chennai', pincode='600028', salary=6000}\r\nEmployee{empId=103, empName='Madhu', empAge=32, totalExp=6, location='Chennai', pincode='600054', salary=10000}\r\n----------------Print Records until Chennai - Stops printing when condition is Met ----------------\r\nEmployee{empId=101, empName='Mugil', empAge=30, totalExp=5, location='Chennai', pincode='600018', salary=5000}\r\nEmployee{empId=102, empName='Mani', empAge=33, totalExp=4, location='Chennai', pincode='600028', salary=6000}\r\nEmployee{empId=103, empName='Madhu', empAge=32, totalExp=6, location='Chennai', pincode='600054', salary=10000}\r\n----------------Record with Min and Max Value ----------------\r\nEmployee{empId=104, empName='Vinu', empAge=29, totalExp=5, location='Bangalore', pincode='500234', salary=15000}\r\nEmployee{empId=105, empName='Srini', empAge=40, totalExp=10, location='Delhi', pincode='622142', salary=7000}\r\n----------------Get Employee with Max Exp in Chennai ----------------\r\nEmployee{empId=103, empName='Madhu', empAge=32, totalExp=6, location='Chennai', pincode='600054', salary=10000}\r\n----------------Find First  ----------------\r\nEmployee{empId=101, empName='Mugil', empAge=30, totalExp=5, location='Chennai', pincode='600018', salary=5000}\r\n----------------Find Any  ----------------\r\nEmployee{empId=102, empName='Mani', empAge=33, totalExp=4, location='Chennai', pincode='600028', salary=6000}\r\n----------------Sum - Get Sum of Salary in Chennai  ----------------\r\nSum of Empl Salary - Chennai 21000\r\nSum of Empl Salary - Chennai 21000\r\nSum of Empl Salary - Chennai 21000\r\n----------------Average - Get Average of Salary in Chennai  ----------------\r\nAverage Salary of Employee - Chennai OptionalDouble[7000.0]\r\n----------------Group By -  Get Employees grouped by Location  ----------------\r\nEmployees from Delhi\r\nEmployee{empId=105, empName='Srini', empAge=40, totalExp=10, location='Delhi', pincode='622142', salary=7000}\r\nEmployee{empId=106, empName='Dimple', empAge=35, totalExp=5, location='Delhi', pincode='622142', salary=8000}\r\nEmployees from Chennai\r\nEmployee{empId=101, empName='Mugil', empAge=30, totalExp=5, location='Chennai', pincode='600018', salary=5000}\r\nEmployee{empId=102, empName='Mani', empAge=33, totalExp=4, location='Chennai', pincode='600028', salary=6000}\r\nEmployee{empId=103, empName='Madhu', empAge=32, totalExp=6, location='Chennai', pincode='600054', salary=10000}\r\nEmployees from Bangalore\r\nEmployee{empId=104, empName='Vinu', empAge=29, totalExp=5, location='Bangalore', pincode='500234', salary=15000}\r\n----------------Group By -  Get Employees with Max Salary in Location  ----------------\r\nEmployee Location is Delhi and salary is 8000\r\nEmployee Location is Chennai and salary is 10000\r\nEmployee Location is Bangalore and salary is 15000\r\n---------------- Employee at Location -  Get Employee Object grouped by Location  ----------------\r\nEmployee Location is Delhi\r\nSrini\r\nDimple\r\nEmployee Location is Chennai\r\nMugil\r\nMani\r\nMadhu\r\nEmployee Location is Bangalore\r\nVinu\r\n---------------- Employee at Location -  Using Collectors.mapping  ----------------\r\nEmployee Name is [Srini, Dimple] and Location is Delhi\r\nEmployee Name is [Mugil, Mani, Madhu] and Location is Chennai\r\nEmployee Name is [Vinu] and Location is Bangalore\r\n<\/pre>\n","protected":false},"excerpt":{"rendered":"<p>We have a Employee Object with following fields &#8211; empId,salary,empAge,totalExp,empName,location,pincode. Now we are going to do following operations in the List containing Employee Object. import java.util.*; import java.util.function.Predicate; import java.util.stream.Collectors; public class MatchEgs { public static void main(String&#x5B;] args) { Employee objEmp1 = new Employee(101, &quot;Mugil&quot;, 30, &quot;Chennai&quot;, &quot;600018&quot;, 5, 5000); Employee objEmp2 = new&hellip; <a href=\"https:\/\/codethataint.com\/blog\/real-time-example-using-lambda-functions\/\">Continue reading <span class=\"meta-nav\">&rarr;<\/span><\/a><\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"closed","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[277],"tags":[],"class_list":["post-4290","post","type-post","status-publish","format-standard","hentry","category-codes"],"_links":{"self":[{"href":"https:\/\/codethataint.com\/blog\/wp-json\/wp\/v2\/posts\/4290","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/codethataint.com\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/codethataint.com\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/codethataint.com\/blog\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/codethataint.com\/blog\/wp-json\/wp\/v2\/comments?post=4290"}],"version-history":[{"count":5,"href":"https:\/\/codethataint.com\/blog\/wp-json\/wp\/v2\/posts\/4290\/revisions"}],"predecessor-version":[{"id":5064,"href":"https:\/\/codethataint.com\/blog\/wp-json\/wp\/v2\/posts\/4290\/revisions\/5064"}],"wp:attachment":[{"href":"https:\/\/codethataint.com\/blog\/wp-json\/wp\/v2\/media?parent=4290"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/codethataint.com\/blog\/wp-json\/wp\/v2\/categories?post=4290"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/codethataint.com\/blog\/wp-json\/wp\/v2\/tags?post=4290"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}