{"id":33670,"date":"2023-02-11T15:41:54","date_gmt":"2023-02-11T10:11:54","guid":{"rendered":"https:\/\/jassweb.com\/solved\/solved-node-js-how-do-i-save-json-data-without-filling-up-my-storage-closed\/"},"modified":"2023-02-11T15:41:54","modified_gmt":"2023-02-11T10:11:54","slug":"solved-node-js-how-do-i-save-json-data-without-filling-up-my-storage-closed","status":"publish","type":"post","link":"https:\/\/jassweb.com\/solved\/solved-node-js-how-do-i-save-json-data-without-filling-up-my-storage-closed\/","title":{"rendered":"[Solved] NODE.JS How do I save JSON data without filling up my storage [closed]"},"content":{"rendered":"<p> [ad_1]<br \/>\n<\/p>\n<div id=\"answer-67587836\" class=\"answer js-answer accepted-answer js-accepted-answer\" data-answerid=\"67587836\" data-parentid=\"67586830\" data-score=\"2\" data-position-on-page=\"1\" data-highest-scored=\"1\" data-question-has-accepted-highest-score=\"1\" itemprop=\"acceptedAnswer\" itemscope itemtype=\"https:\/\/schema.org\/Answer\">\n<div class=\"post-layout\">\n<div class=\"votecell post-layout--left\"><\/div>\n<div class=\"answercell post-layout--right\">\n<div class=\"s-prose js-post-body\" itemprop=\"text\">\n<p><strong>config<\/strong><\/p>\n<p>For this answer we&#8217;ll establish a simple <code>config<\/code> object to store any values &#8211;<\/p>\n<pre class=\"lang-js prettyprint-override\"><code>\/\/ config.json\n\n{\"counter\":0}\n<\/code><\/pre>\n<p><strong>server<\/strong><\/p>\n<p>We will create a simple server using <a rel=\"nofollow noopener\" target=\"_blank\" href=\"https:\/\/nodejs.org\/api\/http.html#http_http_createserver_options_requestlistener\">http.createServer<\/a>. We will use the request method and request URL to look up a <code>handler<\/code> or respond with 404 when no handler is found &#8211;<\/p>\n<pre class=\"lang-js prettyprint-override\"><code>\/\/ server.js\n\nimport { createServer } from \"http\"\nimport { readFile, writeFile } from \"fs\/promises\"\n\nconst server = createServer(async (req, res) =&gt; {\n  const handler = routes?.[req.method.toLowerCase()]?.[req.url]\n  if (handler == null) {\n    res.writeHead(404, {'Content-Type': 'text\/plain'})\n    res.end(`No route for ${req.method} ${req.url}`)\n  }\n  else {\n    await handler(req, res)\n    res.end()\n  }\n})\n\nserver.listen(8000)\n<\/code><\/pre>\n<p>Next we define the <code>routes<\/code> to <code>\/getConfig<\/code> and <code>\/saveConfig<\/code> &#8211;<\/p>\n<pre class=\"lang-js prettyprint-override\"><code>\/\/ server.js (continued)\n\nconst routes = {\n  get: {\n    \"\/getConfig\": async (req, res) =&gt; {\n      res.writeHead(200, {'content-type': 'application\/json'})\n      res.write(await readFile(\".\/config.json\"))\n    }\n  },\n  post: {\n    \"\/saveConfig\": async (req, res) =&gt; {\n      await writeFile(\".\/config.json\", await readBody(req))\n      res.writeHead(204)\n    },\n    \"\/reset\": async (req, res) =&gt; {\n      await writeFile(\".\/config.json\", JSON.stringify({ counter: 0 }))\n      res.writeHead(204)\n    }\n  }\n}\n<\/code><\/pre>\n<p>This depends on a reusable helper, <code>readBody<\/code> &#8211;<\/p>\n<pre class=\"lang-js prettyprint-override\"><code>\/\/ server.js (continued)\n\nfunction readBody(req) {\n  return new Promise((resolve, reject) =&gt; {\n    const body = []\n    req.on('data', chunk =&gt; body.push(Buffer.from(chunk)))\n    req.on('end', _ =&gt; resolve(Buffer.concat(body).toString()))\n    req.on('error', reject)\n  })\n}\n<\/code><\/pre>\n<p><strong>client<\/strong><\/p>\n<p>In this case your bot is the http client. The node docs for <a rel=\"nofollow noopener\" target=\"_blank\" href=\"https:\/\/nodejs.org\/dist\/latest-v16.x\/docs\/api\/http.html#http_http_get_url_options_callback\">http.get<\/a> include this long-winded example, but don&#8217;t let it worry you &#8211;<\/p>\n<pre class=\"lang-js prettyprint-override\"><code>\/\/ example from node docs\n\nhttp.get('http:\/\/localhost:8000\/', (res) =&gt; {\n  const { statusCode } = res;\n  const contentType = res.headers['content-type'];\n\n  let error;\n  \/\/ Any 2xx status code signals a successful response but\n  \/\/ here we're only checking for 200.\n  if (statusCode !== 200) {\n    error = new Error('Request Failed.\\n' +\n                      `Status Code: ${statusCode}`);\n  } else if (!\/^application\\\/json\/.test(contentType)) {\n    error = new Error('Invalid content-type.\\n' +\n                      `Expected application\/json but received ${contentType}`);\n  }\n  if (error) {\n    console.error(error.message);\n    \/\/ Consume response data to free up memory\n    res.resume();\n    return;\n  }\n\n  res.setEncoding('utf8');\n  let rawData=\"\";\n  res.on('data', (chunk) =&gt; { rawData += chunk; });\n  res.on('end', () =&gt; {\n    try {\n      const parsedData = JSON.parse(rawData);\n      console.log(parsedData);\n    } catch (e) {\n      console.error(e.message);\n    }\n  });\n}).on('error', (e) =&gt; {\n  console.error(`Got error: ${e.message}`);\n});\n<\/code><\/pre>\n<p>You&#8217;re not expected to copy this verbatim. Imagine writing that much code each time you wanted to fetch some JSON. You can think of the <a rel=\"nofollow noopener\" target=\"_blank\" href=\"https:\/\/nodejs.org\/dist\/latest-v16.x\/docs\/api\/http.html\">http<\/a> module as a low-level API that enables you to design higher-level functions &#8211;<\/p>\n<pre class=\"lang-js prettyprint-override\"><code>\/\/ client.js \n\nimport * as http from \"http\"\n\nfunction request (href, { body = \"\", ...options } = {}) {\n  return new Promise((resolve, reject) =&gt;\n    http.request(href, options, res =&gt; {\n      const data = []\n      res.on('data', chunk =&gt; data.push(chunk))\n      res.on('end', _ =&gt; resolve({\n        status: res.statusCode,\n        headers: res.headers,\n        data: Buffer.concat(data).toString()\n      }))\n    })\n    .on('error', reject)\n    .end(body)\n  )\n}\n<\/code><\/pre>\n<p>Above our <code>request<\/code> function resolves a <code>{ status, headers, data }<\/code> object, and we can write specialized forms <code>get<\/code> and <code>getJson<\/code> that make it even easier to intereact with &#8211;<\/p>\n<pre class=\"lang-js prettyprint-override\"><code>\/\/ client.js (continued)\n\nasync function get (href) {\n  const { status, headers, data } = await request(href)\n  if (status &lt; 200 || status &gt;= 300)\n    throw Error(status)\n  return { status, headers, data }\n}\n\nasync function getJson (href) {\n  const { headers, data } = await get(href)\n  if (!headers['content-type'].startsWith(\"application\/json\"))\n    throw Error(`expected application\/json but received ${headers['content-type']}`)\n  return JSON.parse(data)\n}\n<\/code><\/pre>\n<p>We can do the same for <code>post<\/code> &#8211;<\/p>\n<pre class=\"lang-js prettyprint-override\"><code>\/\/ client.js (continued)\n\nasync function post (href, body = \"\") {\n  const { status, headers, data } = await request(href, { body, method: \"POST\" })\n  if (status &lt; 200 || status &gt;= 300)\n    throw Error(status)\n  return { status, headers, data }\n}\n<\/code><\/pre>\n<p>Finally here is our <code>bot<\/code> code. It reads the config via <code>get<\/code>, updates the config via <code>post<\/code>, and re-reads it via <code>get<\/code> to return the confirmed result &#8211;<\/p>\n<pre class=\"lang-js prettyprint-override\"><code>\/\/ client.js (continued)\n\nasync function bot() {\n  const config = await getJson(\"http:\/\/localhost:8000\/getConfig\")\n  await post(\"http:\/\/localhost:8000\/saveConfig\", JSON.stringify({counter: config.counter + 1}))\n  return getJson(\"http:\/\/localhost:8000\/getConfig\")\n}\n\nbot().then(console.log, console.error)\n<\/code><\/pre>\n<p><strong>run<\/strong><\/p>\n<p>Start the <code>server<\/code> in your terminal &#8211;<\/p>\n<pre class=\"lang-sh prettyprint-override\"><code>$ node .\/server.js\n<\/code><\/pre>\n<p>In a <strong>separate terminal<\/strong>, run the <code>client<\/code> a few times &#8211;<\/p>\n<pre class=\"lang-sh prettyprint-override\"><code>$ node .\/client.js\n<\/code><\/pre>\n<pre class=\"lang-js prettyprint-override\"><code>{ counter: 1 }\n<\/code><\/pre>\n<pre class=\"lang-sh prettyprint-override\"><code>$ node .\/client.js\n<\/code><\/pre>\n<pre class=\"lang-js prettyprint-override\"><code>{ counter: 2 }\n<\/code><\/pre>\n<pre class=\"lang-sh prettyprint-override\"><code>$ node .\/client.js\n<\/code><\/pre>\n<pre class=\"lang-js prettyprint-override\"><code>{ counter: 3 }\n<\/code><\/pre>\n<p><strong>node modules<\/strong><\/p>\n<p>Above we took a sort of DIY approach to the problem. But this kind of problem has been solved many ways before. There are popular libraries like <a rel=\"nofollow noopener\" target=\"_blank\" href=\"http:\/\/expressjs.com\">express<\/a> and <a rel=\"nofollow noopener\" target=\"_blank\" href=\"https:\/\/koajs.com\">koajs<\/a> that would make much of this a lot easier. Now that you know the purpose they serve, give &#8217;em a try!<\/p>\n<\/p><\/div>\n<div class=\"mt24\"><\/div>\n<\/div>\n<p>            <span class=\"d-none\" itemprop=\"commentCount\"><\/span> <\/p><\/div>\n<\/div>\n<p>[ad_2]<\/p>\n<p>solved NODE.JS How do I save JSON data without filling up my storage [closed] <\/p>\n","protected":false},"excerpt":{"rendered":"<p>[ad_1] config For this answer we&#8217;ll establish a simple config object to store any values &#8211; \/\/ config.json {&#8220;counter&#8221;:0} server We will create a simple server using http.createServer. We will use the request method and request URL to look up a handler or respond with 404 when no handler is found &#8211; \/\/ server.js import &#8230; <a title=\"[Solved] NODE.JS How do I save JSON data without filling up my storage [closed]\" class=\"read-more\" href=\"https:\/\/jassweb.com\/solved\/solved-node-js-how-do-i-save-json-data-without-filling-up-my-storage-closed\/\" aria-label=\"More on [Solved] NODE.JS How do I save JSON data without filling up my storage [closed]\">Read more<\/a><\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[320],"tags":[819,333,356,902],"class_list":["post-33670","post","type-post","status-publish","format-standard","hentry","category-solved","tag-discord-js","tag-javascript","tag-json","tag-node-js"],"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v26.5 - https:\/\/yoast.com\/wordpress\/plugins\/seo\/ -->\n<title>[Solved] NODE.JS How do I save JSON data without filling up my storage [closed] - JassWeb<\/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:\/\/jassweb.com\/solved\/solved-node-js-how-do-i-save-json-data-without-filling-up-my-storage-closed\/\" \/>\n<meta property=\"og:locale\" content=\"en_US\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"[Solved] NODE.JS How do I save JSON data without filling up my storage [closed] - JassWeb\" \/>\n<meta property=\"og:description\" content=\"[ad_1] config For this answer we&#8217;ll establish a simple config object to store any values &#8211; \/\/ config.json {&quot;counter&quot;:0} server We will create a simple server using http.createServer. We will use the request method and request URL to look up a handler or respond with 404 when no handler is found &#8211; \/\/ server.js import ... Read more\" \/>\n<meta property=\"og:url\" content=\"https:\/\/jassweb.com\/solved\/solved-node-js-how-do-i-save-json-data-without-filling-up-my-storage-closed\/\" \/>\n<meta property=\"og:site_name\" content=\"JassWeb\" \/>\n<meta property=\"article:published_time\" content=\"2023-02-11T10:11:54+00:00\" \/>\n<meta name=\"author\" content=\"Kirat\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:label1\" content=\"Written by\" \/>\n\t<meta name=\"twitter:data1\" content=\"Kirat\" \/>\n\t<meta name=\"twitter:label2\" content=\"Est. reading time\" \/>\n\t<meta name=\"twitter:data2\" content=\"4 minutes\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\/\/schema.org\",\"@graph\":[{\"@type\":\"Article\",\"@id\":\"https:\/\/jassweb.com\/solved\/solved-node-js-how-do-i-save-json-data-without-filling-up-my-storage-closed\/#article\",\"isPartOf\":{\"@id\":\"https:\/\/jassweb.com\/solved\/solved-node-js-how-do-i-save-json-data-without-filling-up-my-storage-closed\/\"},\"author\":{\"name\":\"Kirat\",\"@id\":\"https:\/\/jassweb.com\/solved\/#\/schema\/person\/65c9c7b7958150c0dc8371fa35dd7c31\"},\"headline\":\"[Solved] NODE.JS How do I save JSON data without filling up my storage [closed]\",\"datePublished\":\"2023-02-11T10:11:54+00:00\",\"mainEntityOfPage\":{\"@id\":\"https:\/\/jassweb.com\/solved\/solved-node-js-how-do-i-save-json-data-without-filling-up-my-storage-closed\/\"},\"wordCount\":284,\"publisher\":{\"@id\":\"https:\/\/jassweb.com\/solved\/#organization\"},\"keywords\":[\"discord.js\",\"javascript\",\"json\",\"node.js\"],\"articleSection\":[\"Solved\"],\"inLanguage\":\"en-US\"},{\"@type\":\"WebPage\",\"@id\":\"https:\/\/jassweb.com\/solved\/solved-node-js-how-do-i-save-json-data-without-filling-up-my-storage-closed\/\",\"url\":\"https:\/\/jassweb.com\/solved\/solved-node-js-how-do-i-save-json-data-without-filling-up-my-storage-closed\/\",\"name\":\"[Solved] NODE.JS How do I save JSON data without filling up my storage [closed] - JassWeb\",\"isPartOf\":{\"@id\":\"https:\/\/jassweb.com\/solved\/#website\"},\"datePublished\":\"2023-02-11T10:11:54+00:00\",\"breadcrumb\":{\"@id\":\"https:\/\/jassweb.com\/solved\/solved-node-js-how-do-i-save-json-data-without-filling-up-my-storage-closed\/#breadcrumb\"},\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\/\/jassweb.com\/solved\/solved-node-js-how-do-i-save-json-data-without-filling-up-my-storage-closed\/\"]}]},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\/\/jassweb.com\/solved\/solved-node-js-how-do-i-save-json-data-without-filling-up-my-storage-closed\/#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Home\",\"item\":\"https:\/\/jassweb.com\/solved\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"[Solved] NODE.JS How do I save JSON data without filling up my storage [closed]\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\/\/jassweb.com\/solved\/#website\",\"url\":\"https:\/\/jassweb.com\/solved\/\",\"name\":\"JassWeb\",\"description\":\"Build High-quality Websites\",\"publisher\":{\"@id\":\"https:\/\/jassweb.com\/solved\/#organization\"},\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\/\/jassweb.com\/solved\/?s={search_term_string}\"},\"query-input\":{\"@type\":\"PropertyValueSpecification\",\"valueRequired\":true,\"valueName\":\"search_term_string\"}}],\"inLanguage\":\"en-US\"},{\"@type\":\"Organization\",\"@id\":\"https:\/\/jassweb.com\/solved\/#organization\",\"name\":\"Jass Web\",\"url\":\"https:\/\/jassweb.com\/solved\/\",\"logo\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\/\/jassweb.com\/solved\/#\/schema\/logo\/image\/\",\"url\":\"https:\/\/jassweb.com\/wp-content\/uploads\/2021\/02\/jass-website-logo-1.png\",\"contentUrl\":\"https:\/\/jassweb.com\/wp-content\/uploads\/2021\/02\/jass-website-logo-1.png\",\"width\":693,\"height\":132,\"caption\":\"Jass Web\"},\"image\":{\"@id\":\"https:\/\/jassweb.com\/solved\/#\/schema\/logo\/image\/\"}},{\"@type\":\"Person\",\"@id\":\"https:\/\/jassweb.com\/solved\/#\/schema\/person\/65c9c7b7958150c0dc8371fa35dd7c31\",\"name\":\"Kirat\",\"image\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\/\/jassweb.com\/solved\/#\/schema\/person\/image\/\",\"url\":\"https:\/\/jassweb.com\/solved\/wp-content\/litespeed\/avatar\/1261af3c9451399fa1336d28b98ea3bb.jpg?ver=1775798750\",\"contentUrl\":\"https:\/\/jassweb.com\/solved\/wp-content\/litespeed\/avatar\/1261af3c9451399fa1336d28b98ea3bb.jpg?ver=1775798750\",\"caption\":\"Kirat\"},\"sameAs\":[\"http:\/\/jassweb.com\"],\"url\":\"https:\/\/jassweb.com\/solved\/author\/jaspritsinghghumangmail-com\/\"}]}<\/script>\n<!-- \/ Yoast SEO plugin. -->","yoast_head_json":{"title":"[Solved] NODE.JS How do I save JSON data without filling up my storage [closed] - JassWeb","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:\/\/jassweb.com\/solved\/solved-node-js-how-do-i-save-json-data-without-filling-up-my-storage-closed\/","og_locale":"en_US","og_type":"article","og_title":"[Solved] NODE.JS How do I save JSON data without filling up my storage [closed] - JassWeb","og_description":"[ad_1] config For this answer we&#8217;ll establish a simple config object to store any values &#8211; \/\/ config.json {\"counter\":0} server We will create a simple server using http.createServer. We will use the request method and request URL to look up a handler or respond with 404 when no handler is found &#8211; \/\/ server.js import ... Read more","og_url":"https:\/\/jassweb.com\/solved\/solved-node-js-how-do-i-save-json-data-without-filling-up-my-storage-closed\/","og_site_name":"JassWeb","article_published_time":"2023-02-11T10:11:54+00:00","author":"Kirat","twitter_card":"summary_large_image","twitter_misc":{"Written by":"Kirat","Est. reading time":"4 minutes"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"Article","@id":"https:\/\/jassweb.com\/solved\/solved-node-js-how-do-i-save-json-data-without-filling-up-my-storage-closed\/#article","isPartOf":{"@id":"https:\/\/jassweb.com\/solved\/solved-node-js-how-do-i-save-json-data-without-filling-up-my-storage-closed\/"},"author":{"name":"Kirat","@id":"https:\/\/jassweb.com\/solved\/#\/schema\/person\/65c9c7b7958150c0dc8371fa35dd7c31"},"headline":"[Solved] NODE.JS How do I save JSON data without filling up my storage [closed]","datePublished":"2023-02-11T10:11:54+00:00","mainEntityOfPage":{"@id":"https:\/\/jassweb.com\/solved\/solved-node-js-how-do-i-save-json-data-without-filling-up-my-storage-closed\/"},"wordCount":284,"publisher":{"@id":"https:\/\/jassweb.com\/solved\/#organization"},"keywords":["discord.js","javascript","json","node.js"],"articleSection":["Solved"],"inLanguage":"en-US"},{"@type":"WebPage","@id":"https:\/\/jassweb.com\/solved\/solved-node-js-how-do-i-save-json-data-without-filling-up-my-storage-closed\/","url":"https:\/\/jassweb.com\/solved\/solved-node-js-how-do-i-save-json-data-without-filling-up-my-storage-closed\/","name":"[Solved] NODE.JS How do I save JSON data without filling up my storage [closed] - JassWeb","isPartOf":{"@id":"https:\/\/jassweb.com\/solved\/#website"},"datePublished":"2023-02-11T10:11:54+00:00","breadcrumb":{"@id":"https:\/\/jassweb.com\/solved\/solved-node-js-how-do-i-save-json-data-without-filling-up-my-storage-closed\/#breadcrumb"},"inLanguage":"en-US","potentialAction":[{"@type":"ReadAction","target":["https:\/\/jassweb.com\/solved\/solved-node-js-how-do-i-save-json-data-without-filling-up-my-storage-closed\/"]}]},{"@type":"BreadcrumbList","@id":"https:\/\/jassweb.com\/solved\/solved-node-js-how-do-i-save-json-data-without-filling-up-my-storage-closed\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https:\/\/jassweb.com\/solved\/"},{"@type":"ListItem","position":2,"name":"[Solved] NODE.JS How do I save JSON data without filling up my storage [closed]"}]},{"@type":"WebSite","@id":"https:\/\/jassweb.com\/solved\/#website","url":"https:\/\/jassweb.com\/solved\/","name":"JassWeb","description":"Build High-quality Websites","publisher":{"@id":"https:\/\/jassweb.com\/solved\/#organization"},"potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/jassweb.com\/solved\/?s={search_term_string}"},"query-input":{"@type":"PropertyValueSpecification","valueRequired":true,"valueName":"search_term_string"}}],"inLanguage":"en-US"},{"@type":"Organization","@id":"https:\/\/jassweb.com\/solved\/#organization","name":"Jass Web","url":"https:\/\/jassweb.com\/solved\/","logo":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/jassweb.com\/solved\/#\/schema\/logo\/image\/","url":"https:\/\/jassweb.com\/wp-content\/uploads\/2021\/02\/jass-website-logo-1.png","contentUrl":"https:\/\/jassweb.com\/wp-content\/uploads\/2021\/02\/jass-website-logo-1.png","width":693,"height":132,"caption":"Jass Web"},"image":{"@id":"https:\/\/jassweb.com\/solved\/#\/schema\/logo\/image\/"}},{"@type":"Person","@id":"https:\/\/jassweb.com\/solved\/#\/schema\/person\/65c9c7b7958150c0dc8371fa35dd7c31","name":"Kirat","image":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/jassweb.com\/solved\/#\/schema\/person\/image\/","url":"https:\/\/jassweb.com\/solved\/wp-content\/litespeed\/avatar\/1261af3c9451399fa1336d28b98ea3bb.jpg?ver=1775798750","contentUrl":"https:\/\/jassweb.com\/solved\/wp-content\/litespeed\/avatar\/1261af3c9451399fa1336d28b98ea3bb.jpg?ver=1775798750","caption":"Kirat"},"sameAs":["http:\/\/jassweb.com"],"url":"https:\/\/jassweb.com\/solved\/author\/jaspritsinghghumangmail-com\/"}]}},"_links":{"self":[{"href":"https:\/\/jassweb.com\/solved\/wp-json\/wp\/v2\/posts\/33670","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/jassweb.com\/solved\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/jassweb.com\/solved\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/jassweb.com\/solved\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/jassweb.com\/solved\/wp-json\/wp\/v2\/comments?post=33670"}],"version-history":[{"count":0,"href":"https:\/\/jassweb.com\/solved\/wp-json\/wp\/v2\/posts\/33670\/revisions"}],"wp:attachment":[{"href":"https:\/\/jassweb.com\/solved\/wp-json\/wp\/v2\/media?parent=33670"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/jassweb.com\/solved\/wp-json\/wp\/v2\/categories?post=33670"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/jassweb.com\/solved\/wp-json\/wp\/v2\/tags?post=33670"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}