✅ – Script – 23-48 Nov 13

How to append object to form data
const formData = new FormData();
formData.append("profileId", data.profileId);
formData.append("socials", data.socials);
const formData = new FormData();
formData.append("profileId", data.profileId);
formData.append("socials", data.socials);
data.socials is an object while data.profileId is a string Im trying to pass it as formData but data.socials passes an [object Object] as seen in the image below
UU
Unknown User522d ago
S
Script522d ago
it says "[object Object]" is not valid JSON { value: "guerilla testing", label: "Guerilla testing" } this is how the object looks like
UU
Unknown User522d ago
S
Script522d ago
that makes sense nice that works i'll parse it on my backend thanks jstn
UU
Unknown User521d ago