Script
Script3y ago

✅ – 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
6 Replies
Unknown User
Unknown User3y ago
Message Not Public
Sign In & Join Server To View
Script
ScriptOP3y ago
it says "[object Object]" is not valid JSON { value: "guerilla testing", label: "Guerilla testing" } this is how the object looks like
Unknown User
Unknown User3y ago
Message Not Public
Sign In & Join Server To View
Script
ScriptOP3y ago
that makes sense nice that works i'll parse it on my backend thanks jstn
reactibot
reactibot3y ago
This question has an answer! Thank you for helping 😄 If you have a followup question, you may want to reply to this thread so other members know they're related. https://discord.com/channels/102860784329052160/565213527673929729/1041499713754648626
reactibot
reactibot3y ago
This thread hasn’t had any activity in 12 hours, so it’s now locked. Threads are closed automatically after 12 hours. If you have a followup question, you may want to reply to this thread so other members know they're related. https://discord.com/channels/102860784329052160/565213527673929729/1041499713754648626 Question not getting answered? Maybe it's hard to answer, or maybe you asked at a slow time. Check out these resources for help asking a good question: https://stackoverflow.com/help/how-to-ask http://wp.me/p2oIwo-26