The only way I know to load a sharepoint list via Javascript is to load it and on the current list item:

var value = currentItem.get_item(columnTitle);

I want to be able to load an item and on the fly populate a JavaScript Object:

ListName.Field = Value;

so I need a way to iterate through the currentItem and get the Column Title + its Value. The only way I can think of doing that is first by loading the field names and doing it that way, but is there a native way of retreiving all fields from a listitem?

1 Answer 1


If you want to get the collection of "field_name + field_value", you can try:

var fieldValues = currentItem.get_fieldValues();  

It returns an object, the object key is field name and the object value is field value.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.