Quantcast
Viewing all articles
Browse latest Browse all 6517

New Post: SPXmlToJson Formatting Question

I am currently doing a GetListItems on a photolibrary list where I would like to return the filenames. All is going well however I want to convert this into json.

Currently I have this which is working:
var data = $(xData.responseXML).SPFilterNode("z:row").SPXmlToJson({
                        mapping: {
                            ows_FileLeafRef: { mappedName: "Name", objectType: "Text" },
                            ows_FileRef: { mappedName: "Url", objectType: "Text" }
                        }
My question is, how can I format the value of ows_FileLeafRef to remove the stuff I dont want, in this scenario convert:
10;#Filename.JPG
To:
Filename

Viewing all articles
Browse latest Browse all 6517

Trending Articles