{"id":84254,"date":"2017-05-19T13:02:59","date_gmt":"2017-05-19T13:02:59","guid":{"rendered":"https:\/\/webkul.com\/blog\/?p=84254"},"modified":"2024-03-26T11:17:27","modified_gmt":"2024-03-26T11:17:27","slug":"get-category-ids-product-collection-magento2","status":"publish","type":"post","link":"https:\/\/webkul.com\/blog\/get-category-ids-product-collection-magento2\/","title":{"rendered":"Get All Category Ids from Product Collection in magento2"},"content":{"rendered":"\n<p>Get All Category IDs from Product Collection in Magento 2<\/p>\n\n\n\n<p>Today I will explain how you can retrieve all category IDs for every product from the product collection in Magento 2 in this article.<\/p>\n\n\n\n<p>So, at first, we will get a collection of products with filters and some product IDs. You can write the code anywhere according to your requirements and can apply any filter to it. I have written the code in the module&#8217;s helper file.<\/p>\n\n\n\n<p>After that, we will call the addCategoryIds() function from the collection, which will add the &#8216;category_ids&#8217; array to the collection for every product which will contain all category IDs associated with that product. Look at the code below:<\/p>\n\n\n\n<pre class=\"EnlighterJSRAW\">&lt;?php\nnamespace Company\\Module\\Helper;\n\nuse Magento\\Catalog\\Model\\ResourceModel\\Category\\CollectionFactory;\n\nclass Data extends \\Magento\\Framework\\App\\Helper\\AbstractHelper\n{\n    \/**\n     * @var \\Magento\\Catalog\\Model\\ResourceModel\\Product\\CollectionFactory\n     *\/\n    private $productCollection;\n\n    public function __construct(\n        \\Magento\\Catalog\\Model\\ResourceModel\\Product\\CollectionFactory $productCollection\n    ) {\n        parent::__construct($context);\n        $this-&gt;productCollection = $productCollection;\n    }\n\n    public function getProductCollection()\n    {\n        $productIds = &#091;1,2,3,4];\n        $collection = $this-&gt;productCollection-&gt;create()\n        -&gt;addAttributeToSelect(&#039;*&#039;)\n        -&gt;addStoreFilter()\n        -&gt;addFieldToFilter(\n            &#039;entity_id&#039;,\n            &#091;&#039;in&#039; =&gt; $productIds]\n        )\n        -&gt;addCategoryIds(); \/\/ the main function to get all category ids\n        foreach ($collection as $product) {\n            print_r($product-&gt;getCategoryIds());\n\n        }\n    }\n}<\/pre>\n\n\n\n<p>By printing the above collection data, you must be getting <em><strong>&#8216;category_ids&#8217;<\/strong><\/em> as the key with an array of category ids. But if in case you are not getting the <em><strong>&#8216;category_ids&#8217;<\/strong><\/em> value from the above\u00a0collection then you can create <strong>after<\/strong> plugin for the function <strong>addCategoryIds()<\/strong> as below:<\/p>\n\n\n\n<p>In your module&#8217;s <span style=\"text-decoration: underline;\">di.xml<\/span> file write the following code :<\/p>\n\n\n\n<pre class=\"EnlighterJSRAW\">&lt;config xmlns:xsi=&quot;http:\/\/www.w3.org\/2001\/XMLSchema-instance&quot; xsi:noNamespaceSchemaLocation=&quot;urn:magento:framework:ObjectManager\/etc\/config.xsd&quot;&gt;\n    &lt;type name=&quot;Magento\\Catalog\\Model\\ResourceModel\\Product\\Collection&quot;&gt;\n        &lt;plugin name=&quot;Company_Module::productcollection&quot; type=&quot;Company\\Module\\Model\\Plugin\\Productcollection&quot; sortOrder=&quot;1&quot; \/&gt;\n    &lt;\/type&gt;\n&lt;\/config&gt;<\/pre>\n\n\n\n<p>Now create a file <strong>Productcollection.php<\/strong> for the plugin under\u00a0the path as mentioned above, i.e.\u00a0<strong>Company\\Module\\Model\\Plugin\\,<\/strong>\u00a0and write the below code in the file :<\/p>\n\n\n\n<pre class=\"EnlighterJSRAW\">&lt;?php\nnamespace Company\\Module\\Model\\Plugin;\n\nclass Productcollection\n{\n    public function afterAddCategoryIds(\n        \\Magento\\Catalog\\Model\\ResourceModel\\Product\\Collection $subject,\n        $result\n    ) {\n        if ($subject-&gt;getFlag(&#039;category_ids_added&#039;)) {\n            return $subject;\n        }\n        $ids = array_keys($subject-&gt;getItems());\n        if (empty($ids)) {\n            return $subject;\n        }\n\n        $select = $subject-&gt;getConnection()-&gt;select();\n\n        $select-&gt;from(\n            $subject-&gt;getResource()-&gt;getTable(&#039;catalog_category_product&#039;),\n            &#091;&#039;product_id&#039;, &#039;category_id&#039;]\n        );\n        $select-&gt;where(&#039;product_id IN (?)&#039;, $ids);\n\n        $data = $subject-&gt;getConnection()-&gt;fetchAll($select);\n\n        $categoryIds = &#091;];\n        foreach ($data as $info) {\n            if (isset($categoryIds&#091;$info&#091;&#039;product_id&#039;]])) {\n                $categoryIds&#091;$info&#091;&#039;product_id&#039;]]&#091;] = $info&#091;&#039;category_id&#039;];\n            } else {\n                $categoryIds&#091;$info&#091;&#039;product_id&#039;]] = &#091;$info&#091;&#039;category_id&#039;]];\n            }\n        }\n\n        foreach ($subject-&gt;getItems() as $item) {\n            $productId = $item-&gt;getId();\n            if (isset($categoryIds&#091;$productId])) {\n                $item-&gt;setCategoryIds($categoryIds&#091;$productId]);\n            } else {\n                $item-&gt;setCategoryIds(&#091;]);\n            }\n        }\n\n        $subject-&gt;setFlag(&#039;category_ids_added&#039;, true);\n        return $result;\n    }\n}<\/pre>\n\n\n\n<p>NOTE: By using the plugin you will get the category IDs with the product collection for sure. If you print the collection you will find an array with the key <em><strong>&#8216;category_ids&#8217;<\/strong><\/em> which will contain all category IDs associated with that product.<\/p>\n\n\n\n<p>So by using this method, i.e. <strong>addCategoryIds()<\/strong>, <em>you will not have to use any join or loop<\/em> to get all category IDs with product collection.<\/p>\n\n\n\n<p>Hope this blog will help you to develop functionality in a better and optimized way.\u00a0Try this and\u00a0if you have any queries then\u00a0just comment below \ud83d\ude42<\/p>\n","protected":false},"excerpt":{"rendered":"<p>Get All Category IDs from Product Collection in Magento 2 Today I will explain how you can retrieve all category IDs for every product from the product collection in Magento 2 in this article. So, at first, we will get a collection of products with filters and some product IDs. You can write the code <a href=\"https:\/\/webkul.com\/blog\/get-category-ids-product-collection-magento2\/\">[&#8230;]<\/a><\/p>\n","protected":false},"author":103,"featured_media":80140,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[8,302],"tags":[4851,2070],"class_list":["post-84254","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-magento","category-magento2","tag-get-all-category-ids-from-product-collection-in-magento2","tag-magento2"],"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v24.5 - https:\/\/yoast.com\/wordpress\/plugins\/seo\/ -->\n<title>Get All Category Ids from Product Collection in magento2 - Webkul Blog<\/title>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"https:\/\/webkul.com\/blog\/get-category-ids-product-collection-magento2\/\" \/>\n<meta property=\"og:locale\" content=\"en_US\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"Get All Category Ids from Product Collection in magento2 - Webkul Blog\" \/>\n<meta property=\"og:description\" content=\"Get All Category IDs from Product Collection in Magento 2 Today I will explain how you can retrieve all category IDs for every product from the product collection in Magento 2 in this article. So, at first, we will get a collection of products with filters and some product IDs. You can write the code [...]\" \/>\n<meta property=\"og:url\" content=\"https:\/\/webkul.com\/blog\/get-category-ids-product-collection-magento2\/\" \/>\n<meta property=\"og:site_name\" content=\"Webkul Blog\" \/>\n<meta property=\"article:publisher\" content=\"https:\/\/www.facebook.com\/webkul\/\" \/>\n<meta property=\"article:published_time\" content=\"2017-05-19T13:02:59+00:00\" \/>\n<meta property=\"article:modified_time\" content=\"2024-03-26T11:17:27+00:00\" \/>\n<meta property=\"og:image\" content=\"https:\/\/cdnblog.webkul.com\/blog\/wp-content\/uploads\/2017\/04\/Magneto-Code-Snippet.png\" \/>\n\t<meta property=\"og:image:width\" content=\"825\" \/>\n\t<meta property=\"og:image:height\" content=\"260\" \/>\n\t<meta property=\"og:image:type\" content=\"image\/png\" \/>\n<meta name=\"author\" content=\"Pranjali Goel\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:creator\" content=\"@webkul\" \/>\n<meta name=\"twitter:site\" content=\"@webkul\" \/>\n<meta name=\"twitter:label1\" content=\"Written by\" \/>\n\t<meta name=\"twitter:data1\" content=\"Pranjali Goel\" \/>\n\t<meta name=\"twitter:label2\" content=\"Est. reading time\" \/>\n\t<meta name=\"twitter:data2\" content=\"2 minutes\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\/\/schema.org\",\"@graph\":[{\"@type\":\"Article\",\"@id\":\"https:\/\/webkul.com\/blog\/get-category-ids-product-collection-magento2\/#article\",\"isPartOf\":{\"@id\":\"https:\/\/webkul.com\/blog\/get-category-ids-product-collection-magento2\/\"},\"author\":{\"name\":\"Pranjali Goel\",\"@id\":\"https:\/\/webkul.com\/blog\/#\/schema\/person\/c1964884ceb33a5ffdf322ee5424f692\"},\"headline\":\"Get All Category Ids from Product Collection in magento2\",\"datePublished\":\"2017-05-19T13:02:59+00:00\",\"dateModified\":\"2024-03-26T11:17:27+00:00\",\"mainEntityOfPage\":{\"@id\":\"https:\/\/webkul.com\/blog\/get-category-ids-product-collection-magento2\/\"},\"wordCount\":306,\"commentCount\":0,\"publisher\":{\"@id\":\"https:\/\/webkul.com\/blog\/#organization\"},\"image\":{\"@id\":\"https:\/\/webkul.com\/blog\/get-category-ids-product-collection-magento2\/#primaryimage\"},\"thumbnailUrl\":\"https:\/\/cdnblog.webkul.com\/blog\/wp-content\/uploads\/2017\/04\/Magneto-Code-Snippet.png\",\"keywords\":[\"Get All Category Ids from Product Collection in magento2\",\"Magento2\"],\"articleSection\":[\"magento\",\"Magento2\"],\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"CommentAction\",\"name\":\"Comment\",\"target\":[\"https:\/\/webkul.com\/blog\/get-category-ids-product-collection-magento2\/#respond\"]}]},{\"@type\":\"WebPage\",\"@id\":\"https:\/\/webkul.com\/blog\/get-category-ids-product-collection-magento2\/\",\"url\":\"https:\/\/webkul.com\/blog\/get-category-ids-product-collection-magento2\/\",\"name\":\"Get All Category Ids from Product Collection in magento2 - Webkul Blog\",\"isPartOf\":{\"@id\":\"https:\/\/webkul.com\/blog\/#website\"},\"primaryImageOfPage\":{\"@id\":\"https:\/\/webkul.com\/blog\/get-category-ids-product-collection-magento2\/#primaryimage\"},\"image\":{\"@id\":\"https:\/\/webkul.com\/blog\/get-category-ids-product-collection-magento2\/#primaryimage\"},\"thumbnailUrl\":\"https:\/\/cdnblog.webkul.com\/blog\/wp-content\/uploads\/2017\/04\/Magneto-Code-Snippet.png\",\"datePublished\":\"2017-05-19T13:02:59+00:00\",\"dateModified\":\"2024-03-26T11:17:27+00:00\",\"breadcrumb\":{\"@id\":\"https:\/\/webkul.com\/blog\/get-category-ids-product-collection-magento2\/#breadcrumb\"},\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\/\/webkul.com\/blog\/get-category-ids-product-collection-magento2\/\"]}]},{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\/\/webkul.com\/blog\/get-category-ids-product-collection-magento2\/#primaryimage\",\"url\":\"https:\/\/cdnblog.webkul.com\/blog\/wp-content\/uploads\/2017\/04\/Magneto-Code-Snippet.png\",\"contentUrl\":\"https:\/\/cdnblog.webkul.com\/blog\/wp-content\/uploads\/2017\/04\/Magneto-Code-Snippet.png\",\"width\":825,\"height\":260},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\/\/webkul.com\/blog\/get-category-ids-product-collection-magento2\/#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Home\",\"item\":\"https:\/\/webkul.com\/blog\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"Get All Category Ids from Product Collection in magento2\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\/\/webkul.com\/blog\/#website\",\"url\":\"https:\/\/webkul.com\/blog\/\",\"name\":\"Webkul Blog\",\"description\":\"\",\"publisher\":{\"@id\":\"https:\/\/webkul.com\/blog\/#organization\"},\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\/\/webkul.com\/blog\/?s={search_term_string}\"},\"query-input\":{\"@type\":\"PropertyValueSpecification\",\"valueRequired\":true,\"valueName\":\"search_term_string\"}}],\"inLanguage\":\"en-US\"},{\"@type\":\"Organization\",\"@id\":\"https:\/\/webkul.com\/blog\/#organization\",\"name\":\"WebKul Software Private Limited\",\"url\":\"https:\/\/webkul.com\/blog\/\",\"logo\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\/\/webkul.com\/blog\/#\/schema\/logo\/image\/\",\"url\":\"https:\/\/cdnblog.webkul.com\/blog\/wp-content\/uploads\/2021\/08\/webkul-logo-accent-sq.png\",\"contentUrl\":\"https:\/\/cdnblog.webkul.com\/blog\/wp-content\/uploads\/2021\/08\/webkul-logo-accent-sq.png\",\"width\":380,\"height\":380,\"caption\":\"WebKul Software Private Limited\"},\"image\":{\"@id\":\"https:\/\/webkul.com\/blog\/#\/schema\/logo\/image\/\"},\"sameAs\":[\"https:\/\/www.facebook.com\/webkul\/\",\"https:\/\/x.com\/webkul\",\"https:\/\/www.instagram.com\/webkul\/\",\"https:\/\/www.linkedin.com\/company\/webkul\",\"https:\/\/www.youtube.com\/user\/webkul\/\"]},{\"@type\":\"Person\",\"@id\":\"https:\/\/webkul.com\/blog\/#\/schema\/person\/c1964884ceb33a5ffdf322ee5424f692\",\"name\":\"Pranjali Goel\",\"image\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\/\/webkul.com\/blog\/#\/schema\/person\/image\/\",\"url\":\"https:\/\/secure.gravatar.com\/avatar\/e670273251719f83735534af186231dd99fbe378466fef356d4e55de5b46244f?s=96&d=https%3A%2F%2Fcdnblog.webkul.com%2Fblog%2Fwp-content%2Fuploads%2F2019%2F10%2Feva.png&r=g\",\"contentUrl\":\"https:\/\/secure.gravatar.com\/avatar\/e670273251719f83735534af186231dd99fbe378466fef356d4e55de5b46244f?s=96&d=https%3A%2F%2Fcdnblog.webkul.com%2Fblog%2Fwp-content%2Fuploads%2F2019%2F10%2Feva.png&r=g\",\"caption\":\"Pranjali Goel\"},\"description\":\"Believes in simple lifestyle and follow a simple logic to make herself better than yesterday.\",\"url\":\"https:\/\/webkul.com\/blog\/author\/pranjali968\/\"}]}<\/script>\n<!-- \/ Yoast SEO plugin. -->","yoast_head_json":{"title":"Get All Category Ids from Product Collection in magento2 - Webkul Blog","robots":{"index":"index","follow":"follow","max-snippet":"max-snippet:-1","max-image-preview":"max-image-preview:large","max-video-preview":"max-video-preview:-1"},"canonical":"https:\/\/webkul.com\/blog\/get-category-ids-product-collection-magento2\/","og_locale":"en_US","og_type":"article","og_title":"Get All Category Ids from Product Collection in magento2 - Webkul Blog","og_description":"Get All Category IDs from Product Collection in Magento 2 Today I will explain how you can retrieve all category IDs for every product from the product collection in Magento 2 in this article. So, at first, we will get a collection of products with filters and some product IDs. You can write the code [...]","og_url":"https:\/\/webkul.com\/blog\/get-category-ids-product-collection-magento2\/","og_site_name":"Webkul Blog","article_publisher":"https:\/\/www.facebook.com\/webkul\/","article_published_time":"2017-05-19T13:02:59+00:00","article_modified_time":"2024-03-26T11:17:27+00:00","og_image":[{"width":825,"height":260,"url":"https:\/\/cdnblog.webkul.com\/blog\/wp-content\/uploads\/2017\/04\/Magneto-Code-Snippet.png","type":"image\/png"}],"author":"Pranjali Goel","twitter_card":"summary_large_image","twitter_creator":"@webkul","twitter_site":"@webkul","twitter_misc":{"Written by":"Pranjali Goel","Est. reading time":"2 minutes"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"Article","@id":"https:\/\/webkul.com\/blog\/get-category-ids-product-collection-magento2\/#article","isPartOf":{"@id":"https:\/\/webkul.com\/blog\/get-category-ids-product-collection-magento2\/"},"author":{"name":"Pranjali Goel","@id":"https:\/\/webkul.com\/blog\/#\/schema\/person\/c1964884ceb33a5ffdf322ee5424f692"},"headline":"Get All Category Ids from Product Collection in magento2","datePublished":"2017-05-19T13:02:59+00:00","dateModified":"2024-03-26T11:17:27+00:00","mainEntityOfPage":{"@id":"https:\/\/webkul.com\/blog\/get-category-ids-product-collection-magento2\/"},"wordCount":306,"commentCount":0,"publisher":{"@id":"https:\/\/webkul.com\/blog\/#organization"},"image":{"@id":"https:\/\/webkul.com\/blog\/get-category-ids-product-collection-magento2\/#primaryimage"},"thumbnailUrl":"https:\/\/cdnblog.webkul.com\/blog\/wp-content\/uploads\/2017\/04\/Magneto-Code-Snippet.png","keywords":["Get All Category Ids from Product Collection in magento2","Magento2"],"articleSection":["magento","Magento2"],"inLanguage":"en-US","potentialAction":[{"@type":"CommentAction","name":"Comment","target":["https:\/\/webkul.com\/blog\/get-category-ids-product-collection-magento2\/#respond"]}]},{"@type":"WebPage","@id":"https:\/\/webkul.com\/blog\/get-category-ids-product-collection-magento2\/","url":"https:\/\/webkul.com\/blog\/get-category-ids-product-collection-magento2\/","name":"Get All Category Ids from Product Collection in magento2 - Webkul Blog","isPartOf":{"@id":"https:\/\/webkul.com\/blog\/#website"},"primaryImageOfPage":{"@id":"https:\/\/webkul.com\/blog\/get-category-ids-product-collection-magento2\/#primaryimage"},"image":{"@id":"https:\/\/webkul.com\/blog\/get-category-ids-product-collection-magento2\/#primaryimage"},"thumbnailUrl":"https:\/\/cdnblog.webkul.com\/blog\/wp-content\/uploads\/2017\/04\/Magneto-Code-Snippet.png","datePublished":"2017-05-19T13:02:59+00:00","dateModified":"2024-03-26T11:17:27+00:00","breadcrumb":{"@id":"https:\/\/webkul.com\/blog\/get-category-ids-product-collection-magento2\/#breadcrumb"},"inLanguage":"en-US","potentialAction":[{"@type":"ReadAction","target":["https:\/\/webkul.com\/blog\/get-category-ids-product-collection-magento2\/"]}]},{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/webkul.com\/blog\/get-category-ids-product-collection-magento2\/#primaryimage","url":"https:\/\/cdnblog.webkul.com\/blog\/wp-content\/uploads\/2017\/04\/Magneto-Code-Snippet.png","contentUrl":"https:\/\/cdnblog.webkul.com\/blog\/wp-content\/uploads\/2017\/04\/Magneto-Code-Snippet.png","width":825,"height":260},{"@type":"BreadcrumbList","@id":"https:\/\/webkul.com\/blog\/get-category-ids-product-collection-magento2\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https:\/\/webkul.com\/blog\/"},{"@type":"ListItem","position":2,"name":"Get All Category Ids from Product Collection in magento2"}]},{"@type":"WebSite","@id":"https:\/\/webkul.com\/blog\/#website","url":"https:\/\/webkul.com\/blog\/","name":"Webkul Blog","description":"","publisher":{"@id":"https:\/\/webkul.com\/blog\/#organization"},"potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/webkul.com\/blog\/?s={search_term_string}"},"query-input":{"@type":"PropertyValueSpecification","valueRequired":true,"valueName":"search_term_string"}}],"inLanguage":"en-US"},{"@type":"Organization","@id":"https:\/\/webkul.com\/blog\/#organization","name":"WebKul Software Private Limited","url":"https:\/\/webkul.com\/blog\/","logo":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/webkul.com\/blog\/#\/schema\/logo\/image\/","url":"https:\/\/cdnblog.webkul.com\/blog\/wp-content\/uploads\/2021\/08\/webkul-logo-accent-sq.png","contentUrl":"https:\/\/cdnblog.webkul.com\/blog\/wp-content\/uploads\/2021\/08\/webkul-logo-accent-sq.png","width":380,"height":380,"caption":"WebKul Software Private Limited"},"image":{"@id":"https:\/\/webkul.com\/blog\/#\/schema\/logo\/image\/"},"sameAs":["https:\/\/www.facebook.com\/webkul\/","https:\/\/x.com\/webkul","https:\/\/www.instagram.com\/webkul\/","https:\/\/www.linkedin.com\/company\/webkul","https:\/\/www.youtube.com\/user\/webkul\/"]},{"@type":"Person","@id":"https:\/\/webkul.com\/blog\/#\/schema\/person\/c1964884ceb33a5ffdf322ee5424f692","name":"Pranjali Goel","image":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/webkul.com\/blog\/#\/schema\/person\/image\/","url":"https:\/\/secure.gravatar.com\/avatar\/e670273251719f83735534af186231dd99fbe378466fef356d4e55de5b46244f?s=96&d=https%3A%2F%2Fcdnblog.webkul.com%2Fblog%2Fwp-content%2Fuploads%2F2019%2F10%2Feva.png&r=g","contentUrl":"https:\/\/secure.gravatar.com\/avatar\/e670273251719f83735534af186231dd99fbe378466fef356d4e55de5b46244f?s=96&d=https%3A%2F%2Fcdnblog.webkul.com%2Fblog%2Fwp-content%2Fuploads%2F2019%2F10%2Feva.png&r=g","caption":"Pranjali Goel"},"description":"Believes in simple lifestyle and follow a simple logic to make herself better than yesterday.","url":"https:\/\/webkul.com\/blog\/author\/pranjali968\/"}]}},"amp_enabled":true,"_links":{"self":[{"href":"https:\/\/webkul.com\/blog\/wp-json\/wp\/v2\/posts\/84254","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/webkul.com\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/webkul.com\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/webkul.com\/blog\/wp-json\/wp\/v2\/users\/103"}],"replies":[{"embeddable":true,"href":"https:\/\/webkul.com\/blog\/wp-json\/wp\/v2\/comments?post=84254"}],"version-history":[{"count":3,"href":"https:\/\/webkul.com\/blog\/wp-json\/wp\/v2\/posts\/84254\/revisions"}],"predecessor-version":[{"id":429540,"href":"https:\/\/webkul.com\/blog\/wp-json\/wp\/v2\/posts\/84254\/revisions\/429540"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/webkul.com\/blog\/wp-json\/wp\/v2\/media\/80140"}],"wp:attachment":[{"href":"https:\/\/webkul.com\/blog\/wp-json\/wp\/v2\/media?parent=84254"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/webkul.com\/blog\/wp-json\/wp\/v2\/categories?post=84254"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/webkul.com\/blog\/wp-json\/wp\/v2\/tags?post=84254"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}