How to show/set RichText data dynamically coming for a rest api (Payload CMS)

I am using payload cms for blogs and trying to integrate it with the rest api. I have a richtext field data coming from the api like this. I tried adding a rich text and then in the data I do $page->get('data')->get('layout')->index('0')->get('richText')->get('root')->get('children') but its now working, showing invalid RichTextData

{
	"id": "67132faf6e06c1000137bf5b",
	"richText": {
		"root": {
			"type": "root",
			"format": "",
			"indent": 0,
			"version": 1,
			"children": [
				{
					"type": "paragraph",
					"format": "left",
					"indent": 0,
					"version": 1,
					"children": [
						{
							"mode": "normal",
							"text": "The first week of September is here. And as we look back, august was full of new hardwares, hackathon news and the biggest of all, some key player leaving the game.",
							"type": "text",
							"style": "",
							"detail": 0,
							"format": 0,
							"version": 1
						}
					],
					"direction": "ltr",
					"textStyle": "",
					"textFormat": 0
				},
				{
					"type": "paragraph",
					"format": "left",
					"indent": 0,
					"version": 1,
					"children": [
						{
							"mode": "normal",
							"text": "New Hardware Announcements",
							"type": "text",
							"style": "",
							"detail": 0,
							"format": 1,
							"version": 1
						}
					],
					"direction": "ltr",
					"textStyle": "",
					"textFormat": 1
				},
				{
					"type": "paragraph",
					"format": "left",
					"indent": 0,
					"version": 1,
					"children": [
						{
							"mode": "normal",
							"text": "Pico has officially unveiled the Pico 4 Ultra, a new mixed reality headset. The device was announced on August 20, 2024, at a product communication meeting in China. The device comes with a Qualcomm Snapdragon XR2 Gen 2 processor, 12GB RAM, and dual 2,160 x 2,160 resolution displays with a 105° field of view. It offers full color passthrough capabilities, spatial video recording, and enhanced connectivity with Wi-Fi 7 and Bluetooth 5.3. Priced at approximately $600 in China, pre-orders have begun with shipping starting September 2nd, although global availability is still pending. Additionally, Pico introduced an Enterprise edition for business users and a Motion Tracker accessory for full-body tracking, positioning the Pico 4 Ultra as a strong competitor in the high-end mixed reality market.",
							"type": "text",
							"style": "",
							"detail": 0,
							"format": 0,
							"version": 1
						}
					],
					"direction": "ltr",
					"textStyle": "",
					"textFormat": 0
				},
				{
					"type": "paragraph",
					"format": "left",
					"indent": 0,
					"version": 1,
					"children": [
						{
							"mode": "normal",
							"text": "HTC VIVE is also preparing to unveil a new \"game-changing\" headset, with additional details anticipated later this month.",
							"type": "text",
							"style": "",
							"detail": 0,
							"format": 0,
							"version": 1
						}
					],
					"direction": "ltr",
					"textStyle": "",
					"textFormat": 0
				},
				{
					"type": "paragraph",
					"format": "left",
					"indent": 0,
					"version": 1,
					"children": [
						{
							"mode": "normal",
							"text": "Meta is rumored to be introducing a new Quest headset, potentially named Quest 3s, with leaked specifications suggesting advanced features such as a Qualcomm Snapdragon XR Gen 2 chipset and improved display technology.",
							"type": "text",
							"style": "",
							"detail": 0,
							"format": 0,
							"version": 1
						}
					],
					"direction": "ltr",
					"textStyle": "",
					"textFormat": 0
				},
				{
					"type": "paragraph",
					"format": "left",
					"indent": 0,
					"version": 1,
					"children": [
						{
							"mode": "normal",
							"text": "Hackathons & Challenges- (On going)",
							"type": "text",
							"style": "",
							"detail": 0,
							"format": 1,
							"version": 1
						}
					],
					"direction": "ltr",
					"textStyle": "",
					"textFormat": 1
				},
				{
					"type": "paragraph",
					"format": "left",
					"indent": 0,
					"version": 1,
					"children": [
						{
							"mode": "normal",
							"text": "Create & Play Developer Challenge ",
							"type": "text",
							"style": "",
							"detail": 0,
							"format": 0,
							"version": 1
						},
						{
							"mode": "normal",
							"text": "- ",
							"type": "text",
							"style": "",
							"detail": 0,
							"format": 1,
							"version": 1
						},
						{
							"id": "67132fb9bac7aae865cbd1e8",
							"type": "link",
							"fields": {
								"doc": null,
								"url": "https://www.8thwall.com/blog/post/174412534028/introducing-the-create-and-play-developer-challenge?utm_source=blog.joysticklab.com&utm_medium=referral&utm_campaign=august-ar-digests",
								"newTab": true,
								"linkType": "custom"
							},
							"format": "",
							"indent": 0,
							"version": 3,
							"children": [
								{
									"mode": "normal",
									"text": "Create & Play Developer Challenge | 8th Wall",
									"type": "text",
									"style": "",
									"detail": 0,
									"format": 0,
									"version": 1
								}
							],
							"direction": "ltr"
						}
					],
					"direction": "ltr",
					"textStyle": "",
					"textFormat": 0
				},
				{
					"type": "paragraph",
					"format": "left",
					"indent": 0,
					"version": 1,
					"children": [
						{
							"mode": "normal",
							"text": "The Meta Quest Lifestyle App Accelerator: Funding XR - ",
							"type": "text",
							"style": "",
							"detail": 0,
							"format": 0,
							"version": 1
						},
						{
							"id": "67132fb9bac7aae865cbd1e9",
							"type": "link",
							"fields": {
								"doc": null,
								"url": "https://developer.oculus.com/blog/meta-quest-lifestyle-app-accelerator/?utm_source=blog.joysticklab.com&utm_medium=referral&utm_campaign=august-ar-digests",
								"newTab": true,
								"linkType": "custom"
							},
							"format": "",
							"indent": 0,
							"version": 3,
							"children": [
								{
									"mode": "normal",
									"text": "Introducing the Meta Quest Lifestyle App Accelerator (",
									"type": "text",
									"style": "",
									"detail": 0,
									"format": 0,
									"version": 1
								}
							],
							"direction": "ltr"
						},
						{
							"id": "67132fb9bac7aae865cbd1ea",
							"type": "link",
							"fields": {
								"doc": null,
								"url": "https://oculus.com/?utm_source=blog.joysticklab.com&utm_medium=referral&utm_campaign=august-ar-digests",
								"newTab": true,
								"linkType": "custom"
							},
							"format": "",
							"indent": 0,
							"version": 3,
							"children": [
								{
									"mode": "normal",
									"text": "oculus.com",
									"type": "text",
									"style": "",
									"detail": 0,
									"format": 0,
									"version": 1
								}
							],
							"direction": "ltr"
						},
						{
							"id": "67132fb9bac7aae865cbd1eb",
							"type": "link",
							"fields": {
								"doc": null,
								"url": "https://developer.oculus.com/blog/meta-quest-lifestyle-app-accelerator/?utm_source=blog.joysticklab.com&utm_medium=referral&utm_campaign=august-ar-digests",
								"newTab": true,
								"linkType": "custom"
							},
							"format": "",
							"indent": 0,
							"version": 3,
							"children": [
								{
									"mode": "normal",
									"text": ")",
									"type": "text",
									"style": "",
									"detail": 0,
									"format": 0,
									"version": 1
								}
							],
							"direction": null
						}
					],
					"direction": "ltr",
					"textStyle": "",
					"textFormat": 0
				},
				{
					"type": "paragraph",
					"format": "left",
					"indent": 0,
					"version": 1,
					"children": [
						{
							"mode": "normal",
							"text": "Global XR Hack: ",
							"type": "text",
							"style": "",
							"detail": 0,
							"format": 0,
							"version": 1
						},
						{
							"id": "67132fb9bac7aae865cbd1ec",
							"type": "link",
							"fields": {
								"doc": null,
								"url": "https://www.xrhack.com/?utm_source=blog.joysticklab.com&utm_medium=referral&utm_campaign=august-ar-digests",
								"newTab": true,
								"linkType": "custom"
							},
							"format": "",
							"indent": 0,
							"version": 3,
							"children": [
								{
									"mode": "normal",
									"text": "XR Hack",
									"type": "text",
									"style": "",
									"detail": 0,
									"format": 0,
									"version": 1
								}
							],
							"direction": "ltr"
						}
					],
					"direction": "ltr",
					"textStyle": "",
					"textFormat": 0
				},
				{
					"type": "paragraph",
					"format": "left",
					"indent": 0,
					"version": 1,
					"children": [
						{
							"mode": "normal",
							"text": "Industry Events",
							"type": "text",
							"style": "",
							"detail": 0,
							"format": 1,
							"version": 1
						}
					],
					"direction": "ltr",
					"textStyle": "",
					"textFormat": 1
				},
				{
					"type": "paragraph",
					"format": "left",
					"indent": 0,
					"version": 1,
					"children": [
						{
							"mode": "normal",
							"text": "The 8th International AIXR XR Awards has announced its finalists for 2024, with the winners to be revealed at a ceremony on December 5th in Rotterdam. Categories include XR Healthcare Solution of the Year, XR Education and Training Solution of the Year, and XR Game of the Year, among others.",
							"type": "text",
							"style": "",
							"detail": 0,
							"format": 0,
							"version": 1
						}
					],
					"direction": "ltr",
					"textStyle": "",
					"textFormat": 0
				},
				{
					"type": "paragraph",
					"format": "left",
					"indent": 0,
					"version": 1,
					"children": [
						{
							"mode": "normal",
							"text": "Meta Connect 2024 is set for next month, September 25 - 26 in Menlo Park, CA where more XR innovations and announcements are expected. You can join virtually as well from the following link ",
							"type": "text",
							"style": "",
							"detail": 0,
							"format": 0,
							"version": 1
						},
						{
							"id": "67132fb9bac7aae865cbd1ed",
							"type": "link",
							"fields": {
								"doc": null,
								"url": "https://www.facebook.com/MetaforDevelopers/?utm_source=blog.joysticklab.com&utm_medium=referral&utm_campaign=august-ar-digests",
								"newTab": true,
								"linkType": "custom"
							},
							"format": "",
							"indent": 0,
							"version": 3,
							"children": [
								{
									"mode": "normal",
									"text": "https://www.facebook.com/MetaforDevelopers/",
									"type": "text",
									"style": "",
									"detail": 0,
									"format": 0,
									"version": 1
								}
							],
							"direction": "ltr"
						}
					],
					"direction": "ltr",
					"textStyle": "",
					"textFormat": 0
				},
				{
					"type": "paragraph",
					"format": "left",
					"indent": 0,
					"version": 1,
					"children": [
						{
							"mode": "normal",
							"text": "Company Updates",
							"type": "text",
							"style": "",
							"detail": 0,
							"format": 1,
							"version": 1
						}
					],
					"direction": "ltr",
					"textStyle": "",
					"textFormat": 1
				},
				{
					"type": "paragraph",
					"format": "left",
					"indent": 0,
					"version": 1,
					"children": [
						{
							"mode": "normal",
							"text": "SparkAR is leaving the AR game, as meta decides to discontinue it. Although its sad, I believe that meta has something else planned out as a replacement. ",
							"type": "text",
							"style": "",
							"detail": 0,
							"format": 0,
							"version": 1
						},
						{
							"id": "67132fb9bac7aae865cbd1ee",
							"type": "link",
							"fields": {
								"doc": null,
								"url": "https://spark.meta.com/blog/meta-spark-announcement/?utm_source=blog.joysticklab.com&utm_medium=referral&utm_campaign=august-ar-digests",
								"newTab": true,
								"linkType": "custom"
							},
							"format": "",
							"indent": 0,
							"version": 3,
							"children": [
								{
									"mode": "normal",
									"text": "A Meta Spark Update | Meta Spark",
									"type": "text",
									"style": "",
									"detail": 0,
									"format": 0,
									"version": 1
								}
							],
							"direction": "ltr"
						},
						{
							"type": "linebreak",
							"version": 1
						},
						{
							"type": "linebreak",
							"version": 1
						},
						{
							"mode": "normal",
							"text": "Vuzix Corporation reported a significant drop in Q2 2024 revenues but anticipates improvements in the latter half of the year. The company has launched a new M400 Xtreme smart glasses kit designed for extreme weather conditions.",
							"type": "text",
							"style": "",
							"detail": 0,
							"format": 0,
							"version": 1
						}
					],
					"direction": "ltr",
					"textStyle": "",
					"textFormat": 0
				},
				{
					"type": "paragraph",
					"format": "left",
					"indent": 0,
					"version": 1,
					"children": [
						{
							"mode": "normal",
							"text": "Microsoft may be re-entering the XR hardware market, with reports indicating that it has contracted Samsung to supply micro OLED displays for future mixed reality devices. There are also rumors of potential AI-powered smart glasses in development.",
							"type": "text",
							"style": "",
							"detail": 0,
							"format": 0,
							"version": 1
						}
					],
					"direction": "ltr",
					"textStyle": "",
					"textFormat": 0
				},
				{
					"type": "paragraph",
					"format": "left",
					"indent": 0,
					"version": 1,
					"children": [
						{
							"mode": "normal",
							"text": "ArborXR, a leading provider of enterprise-grade XR device management solutions, has secured $12 million in Series A funding to enhance its platform for managing AR and VR devices. The funding round, led by Mercury Fund and Cortado Ventures, with participation from Impact Venture Capital and Lewis & Clark Ventures, brings ArborXR's total capital raised to over $25 million. Founded in 2020, the company has quickly established itself as a key player in the enterprise XR space, serving over 3,000 companies across 60 countries, including Fortune 500 clients like Bank of America, Pfizer, and Walmart. ArborXR's platform allows businesses to remotely manage XR devices, install apps and content, and control user access within headsets, addressing the challenges of deploying XR technology at scale. The new funding will be used to expand operations, accelerate product development, and support the growing adoption of immersive technologies in enterprise settings, particularly for training and employee development programs.",
							"type": "text",
							"style": "",
							"detail": 0,
							"format": 0,
							"version": 1
						}
					],
					"direction": "ltr",
					"textStyle": "",
					"textFormat": 0
				},
				{
					"type": "paragraph",
					"format": "left",
					"indent": 0,
					"version": 1,
					"children": [
						{
							"mode": "normal",
							"text": "New Features and Technologies",
							"type": "text",
							"style": "",
							"detail": 0,
							"format": 1,
							"version": 1
						}
					],
					"direction": "ltr",
					"textStyle": "",
					"textFormat": 1
				},
				{
					"type": "paragraph",
					"format": "left",
					"indent": 0,
					"version": 1,
					"children": [
						{
							"mode": "normal",
							"text": "Meta has introduced an HDMI Link feature for its Quest 2, 3, and Pro headsets, enabling users to connect their devices to external displays. Additionally, Meta has developed a new AI system capable of generating 3D objects from images.",
							"type": "text",
							"style": "",
							"detail": 0,
							"format": 0,
							"version": 1
						}
					],
					"direction": "ltr",
					"textStyle": "",
					"textFormat": 0
				},
				{
					"type": "paragraph",
					"format": "left",
					"indent": 0,
					"version": 1,
					"children": [
						{
							"mode": "normal",
							"text": "These updates reflect the dynamic and rapidly evolving landscape of the XR industry, with significant advancements in hardware, software, and applications.",
							"type": "text",
							"style": "",
							"detail": 0,
							"format": 0,
							"version": 1
						}
					],
					"direction": "ltr",
					"textStyle": "",
					"textFormat": 0
				}
			],
			"direction": "ltr"
		}
	},
	"enableLink": null,
	"blockName": null,
	"blockType": "content",
	"link": {
		"type": "reference",
		"newTab": null,
		"url": null,
		"label": null,
		"appearance": "default"
	}
}

Im considering using Divhunt with an external Payload CMS for specific collections/blogs, how would this be done?
Can I build a module which loads the content into the website in the frontend or is there a way to save the Payload CMS page data into a Divhunt collection item which would be rendered normally?

Thanks

Pretty basic if you read through the docs and check Divhunts YouTube walkthrough of REST API:

Let us know if you have any more questions. The REST functions in Divhunt is basically next level when it comes to no-code-builders - you can do virtually anything you want, using REST without writing a single line of code…

Thanks, great tutorial and the second link possibly answered already my next question, the API calls are happening on your server (not exposing any keys) and sending only the response data to the client, correct?