Skip to content
This repository has been archived by the owner on Jan 18, 2021. It is now read-only.

Error when updating item using JSON.stringify #60

Open
beruken opened this issue Feb 28, 2020 · 0 comments
Open

Error when updating item using JSON.stringify #60

beruken opened this issue Feb 28, 2020 · 0 comments

Comments

@beruken
Copy link

beruken commented Feb 28, 2020

Everything seems to work well with the exception of updating an item. After inspecting the network call it consistently shows "lists/getbytitle('Title of List')/items(undefined)" despite passing what appears to be a valid json object with the Id: int of the item. However, after further inspection (Thanks to your Sandbox in the demo app!!) I found SPRestlib or maybe even SP doesn't like the Key being wrapped in quotes such as {"Id:":1234,"Title":"It Doesn't work"}. However {Id:1234,Title:"It worked"} works fine. Obviously this is a JSON.stringify issue when converting my objects. I can't seem to find any way to force stringify not to quote the key. Any idea how to deal with this?
K

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant