Get Custom List Data as JSON Format

Hello Dear All,
I have a custom list named locations with title, long, lat, and desc columns I am trying to get these table results as js array in my page. and all table data have to be like shown below. 
<script>
var mapmarkers = [{lat:xxxxx,lon:xxxxx,desc:xxxxx:title:zzzz},{lat:xxxxx,lon:xxxxx,desc:xxxxx:title:zzzz}]
</script>
I tried adding a CQWP and xslt but i did not succeeded. What would be the best way to do it ?
Best. 

http://www.lmgtfy.com/?q=sharepoint%20json%20api
Scott Brickey
MCTS, MCPD, MCITP
www.sbrickey.com
Strategic Data Systems - for all your SharePoint needs

Similar Messages

  • Project Site custom list data reporting with Odata connection, BI reports in Project online 2013.

    Hi,
    Can we create an excel report with Odata feed connection which includes project site custom list data?
    Example: My Project is "ProjectTest" and it has a project site in which i created a custom list "ProjectNotes" with some new columns. I want to include these columns in my report.
    sandeep

    Hello,
    when using the SharePoint ODATA or REST APIs each list and site would have a different endpoint URL. Some example URLs are below:
    REST API:
    https://test.sharepoint.com/sites/pwa/Project01Test/_api/Web/Lists/getByTitle('ProjectNotes')/Items
    https://test.sharepoint.com/sites/pwa/Project01Test/_api/Web/Lists/getByTitle('Risks')/Items
    ODATA SVC:
    https://test.sharepoint.com/sites/pwa/Project01Test/_vti_bin/listdata.svc/Issues
    https://test.sharepoint.com/sites/pwa/Project01Test/_vti_bin/listdata.svc/ChangeRequests
    The down site is that in Excel you cant dynamically update the connection URL so would have to add all of these in manually and create the data models - I guess this is ok if you don't have many projects and don't create many new projects. In code such as
    JavaScript it is easy and you can build up the URL dynamically using variables like below:
    projSiteUrl + "/_api/Web/Lists/getByTitle('ProjectNotes')/Items"
     The options to explore to see if you have make this dynamic and get the data you want are:
    Potentially look at the search API and use that in Excel:
    http://sharepoint.stackexchange.com/questions/98159/retrieving-list-items-from-multiple-sites-via-odata-with-excel
    http://social.technet.microsoft.com/Forums/windows/en-US/727c1893-6b42-478b-afca-b32fb259a53d/retrieve-custom-lists-from-all-projects-for-excel-reports-by-using-odata?forum=sharepointgeneral
    Power Query:
    http://blog.oraylis.de/2013/05/using-dynamic-parameter-values-in-power-query-queries/
    JavaScript (put the data on a page), example:
    http://gallery.technet.microsoft.com/scriptcenter/Server-Risks-and-Issues-on-65dcbe0e
    Or bring the data down to a custom SQL database table and report of that data:
    http://nearbaseline.com/blog/2014/04/project-site-custom-list-reporting-using-ssis-odata-connector/
    Hope that helps
    Paul
    Paul Mather | Twitter |
    http://pwmather.wordpress.com | CPS

  • How can I get a list of SAPScipt character formats?

    I know that SAPScript use the <> for capturing - i.e. preceed text and fields with <NN> and end with </> to change the format.
    For example <B> is for bold.
    i want to know where i can get a list of all the possbile values - have looked thru SDN and the Web with no success on this.
    I used to know this but it have been many years since used sapscript.
    Thanks

    Hi
    I am not sure that I have understood your question correctly.
    But if you want to see all the character formats available inside the form in SE71, there is a push button named "Character Format". Press that button and you would see all the character formats available for the form.
    Raveesh

  • How to convert the alv list data into pdf format

    Hi Expersts,
                      Is it possible to convert the alv list output data into PDF format? if yes, then please help me with this issue.
    thanks in advance,
    Regards,
    Samad

    hii samad,
    you can go through these link.i hope it ll solve your purpose
    How to convert list output to PDF
    Display ALV list output in PDF format
    regards,
    Shweta

  • How to get the list data in MM01/MM02 Classification view

    Hi,
    Anyone know the FM that we use for getting the list in Clasification View of MM01/MM02?
    Thanks,
    Alfred

    hii,
    U can use the below fm to get the classification view in MM02..
    CLFM_OBJECT_CLASSIFICATION
    CLFM_OBJECTS_CLASSIFICATION
    BAPI_OBJCL_CREATE_KEY
    CLFM_CLASS_CLASSIFICATION
    or if u want data from classificaton view then use this function module.
    CLAF_CLASSIFICATION_OF_OBJECTS
    Regards,
    Anil N.

  • Connecting webservice and retrieve the data in json format.

    Hi,
    I need to connect to web service using java and retrieve the data in the format of JSON.
    I'm pretty new to this kind of technology, so kindly inform me about the class which are to be used.
    Thanks in advance

    There isn't one class that will solve your problems. You need to use many classes, and it's not a trivial task.

  • Is there a Function module to get customer hierarchy data?

    Howdy,
    I'm writing a report where the user can, on the selection screen, enter a customer number or a hierarchy node and then the program has to get all the higher level nodes and  and lower level nodes for the selected Sales area.
    eg. for the following hierarchy:
    A
    ->B
    --|-> D
    --|-> E
    -> C
    ---|-> F
    ---|-> G
    if node b was selected it would pull back:
    KUNNR     HKUNNR
    A         blank
    B         A
    C         A
    D         B
    E         B
    F         C
    G         C
    Anyone know if there is a Function module that can do this?
    Thanks

    Hi Victoria,
    even i was using the same FM "RSNDI_SHIE_STRUCTURE_GET3"
    my code goes like this...
    i am passing hierarchy name and  node name...this is for cost element hierarchy.
    please check the code and tell if i am missing anything.
    o/p i am getting is all 0's.
    report ztest5.
    tables : ZREPCODMAP.
    data: itab type standard table of ZREPCODMAP with header line.
    TYPES: BEGIN OF STRUC,
             RESULT type RSSH_S_NODEBYNAMEWOL,
            ZREPCODMAP-REPDSELM,
            END OF STRUC.
    DATA: itab1 type standard table of struc with header line.
    data: w_hiesel like RSNDI_S_HIESEL.
    w_hiesel = '1000KES'.
    *data: w_nodebyname type RSNDI_T_NODENM.
    data: tab type standard table of RSNDI_S_HTAB with header line.
    data: lsubrc type SY-SUBRC.
    select * from ZREPCODMAP into table itab where PROFIT_CTR <> ' '.
    loop at itab.
    concatenate itab-CO_AREA itab-REPDSELM INTO itab1-RESULT.
    *write: itab1.
    break-point.
    CALL FUNCTION 'RSNDI_SHIE_STRUCTURE_GET3'
    EXPORTING
    I_S_HIEKEY =
    i_s_hiesel = w_hiesel
    i_s_subtreesel = itab1-result
    I_T_NODENAME =
    I_NO_NODENM_TABLE = w_flag
    IMPORTING
    E_S_HIEDIR =
    e_subrc = lsubrc
    TABLES
    E_T_HIEDIRT =
    e_t_hierstruc = tab.
    E_T_MHIERNODE =
    E_T_THIERNODE =
    E_T_HIERINTVL =
    E_T_NODENAMES = tab.
    E_T_NODEATTR =
    E_T_LEVEL =
    E_T_MESSAGE =
    write: tab.
    *write: lsubrc.
    endloop.
    Thanks & Regards,
    Vijaya

  • How to find Get Customer list scenario

    Hi Friends,
    I was integrate to R/3 system thru XI. I want to get the customers list from one of R/3 system.
    Now where I can find Getcustomer list Business scenerio.
    I mean which software component I can use for this purpose.
    Please give me helpful answer.
    Regards,
    chandra

    Hi,
    you can create your own for this purpose
    and create all "customer related" interfaces inside it
    Regards,
    michal

  • How to access search service api to get results in JSON format?

    How to access search service api to get results in JSON format in asp.net web application outside SharePoint farm. It should be an app or SharePoint hosted.
    I have tried the same with the help of "http://dotnetmafia.com/blogs/dotnettipoftheday/archive/2013/04/09/how-to-query-sharepoint-2013-using-rest-and-javascript.aspx".
    function onQuerySuccess(data) {
        var results = data.d.query.PrimaryQueryResult.RelevantResults.Table.Rows.results;
        $("#resultsDiv").append('<table>');
        $.each(results, function () {
            $("#resultsDiv").append('<tr>');
            $.each(this.Cells.results, function () {
                $("#resultsDiv").append('<td>' + this.Value + '</td>');
            $("#resultsDiv").append('</tr>');
        $("#resultsDiv").append('</table>');
    But we are getting data.d as undefined.
    I have checked and verify that I am getting success and data in XML format not in JSON. As I expected the JSON. Although I have specified the "JSON" in headers " headers:
    { "Accept": "application/json;
    odata=verbose" } ". 
    Thanks

    Hi,
    Per my understanding, you might want to access search service REST API and get results in JSON format using jQuery.
    The code you use is working in a SharePoint Hosted App project, to compose a working code snippet easier, you can take the demo below for a try:
    <script type="text/javascript" src="http://code.jquery.com/jquery-1.10.2.min.js"></script>
    <script type="text/javascript">
    _spBodyOnLoadFunctionNames.push("ready");
    function ready()
    var spAppWebUrl = _spPageContextInfo.webAbsoluteUrl;
    var queryUrl = spAppWebUrl + "/_api/search/query?querytext='book'";
    $.ajax({
    url: queryUrl,
    method: "GET",
    headers: { "Accept": "application/json; odata=verbose" },
    success: function (data) {
    console.log(data);
    var results = data.d.query.PrimaryQueryResult.RelevantResults.Table.Rows.results;
    $.each(results, function () {
    $.each(this.Cells.results, function () {
    console.log(this.Key+"--"+this.Value);
    error: function (data) {
    console.log(data);
    </script>
    Add the code into a page of your site, it will retrieve JSON format data and print the search result in the console of browser.
    More information about how to work with SharePoint Hosted App:
    https://msdn.microsoft.com/en-us/library/office/fp142379.aspx
    If you want to call the search service REST API in a remote environment, authentication is required to be taken into consideration, the link below with a working demo
    would be helpful:
    https://pholpar.wordpress.com/2013/05/11/accessing-office-365-sharepoint-sites-using-rest-from-a-local-html-javascript-host/
    Best regards
    Patrick Liang
    TechNet Community Support

  • How to Retreive data from custom list on specify conditions?

    Hi All,
    I have custom list.And the custom list data contains 100 rows of data.
    my requirement is  how to retrieve custom list data from specific condition like 20-30,50-70.
    Assume that i want to fetch 20 record to 30th record.
    How to use the caml query for the above situation.
    Please assist me.
    Rama

    Hi 
    Thanks for posting your issue, Kindly browse the below mentioned URL to find related the CAML query example
    http://karinebosch.wordpress.com/2012/02/03/caml-and-the-client-object-model/
    I hope this is helpful to you, mark it as Helpful.
    If this works, Please mark it as Answered.
    Regards,
    Dharmendra Singh (MCPD-EA | MCTS)
    Blog : http://sharepoint-community.net/profile/DharmendraSingh

  • In ActionScript 2.0 , How can I send HTTP request and get the response in JSON format.

    I am using ActionScript 2.0 for my app development. I have checked XML and LoadVars class. These classes by default send/receive data either in XML or name/value pair format. I want to send data in JSON format and receive the response in JSON format. How can I achieve this behavior using AS2.0. I have noticed that AS3.0 has the capabilities to do so. My client platform doesn't support AS3.0. Can anybody suggest a way to achieve this?
    Thanks in Advance.

    Atlast I am able to find the solution for this problem. In the end solutioin is very simple.
    Following steps will help in sending request in JSON format.
    1. extend LoadVars class
    2. override toString method. (It should return JSON format )
    3. Use subclass to send the request.

  • Getting Source Data in Canonical Format

    All -
    I understand that in order to change the date format in xmlp we have to have the source data in the canonical format YYYY-MM-DDTHH:MI:SS
    My question is - How do I get my source data into this format? When I try to alter my session or do a to_char on a date column as follows:
    alter session set nls_date_format="yyyy-mm-ddThh24:mi:ss"
    or
    select to_char(sysdate,'yyyy-mm-ddThh:mi:ss') from dual;
    I get the message that the date format is not recognized. I'm sure that I'm just missing something simple, but any help that could be provided will be greatly appreciated.

    Hey BigD
    The XSD format is not recognized by the db ... Im chasing that up, they docs appear to say otherwise.
    You have some alternatives:
    1. If you are not bothered about the time portion you can just get the YYYY-MM-DD format and it will be formatted correctly by XMLP
    2. Use the Data Template engine from XMLP to get the data, it will format the date for you.
    3. Nasty but you could do something like:
    SELECT TO_CHAR(SYSDATE,'YYYY-MM-DD')||'T'||to_char(sysdate,'HH24:MI:SS') from DUAL
    If/When I get an answer from the db team on any function I'll let you know.
    Regards, tim

  • SSRS Atom feed as JSON format

    Is there anyway to get tablix data in JSON format from Atom Feed generated by an SSRS report?
    Tried HTTP header Accept:application/json, but didn't work. the server still returns XML.

    No, Reporting Service offers only an Atom feed, no other data services.
    Olaf Helper
    [ Blog] [ Xing] [ MVP]

  • How to read and write data from json file from windows phone7 app

    Hi
    I am developing wp7 app for the use of students my questions are
    How can i write a code to read and write the json/text file for the wp7.
    I am using windows 7 OS, VS 2010 Edition.
    This is my code below:
    xaml:
    <Grid>
                        <TextBlock Height="45" HorizontalAlignment="Left" Margin="7,18,0,550" Name="textBlock1" Text="Full
    Name: " />
                        <TextBox Width="350" Height="70" HorizontalAlignment="Left" Margin="108,1,0,0" Name="txtName"
    Text="Enter your full name" VerticalAlignment="Top" />
                        <TextBlock Height="45" HorizontalAlignment="Left" Margin="6,75,0,0" Name="textBlock2" Text="Contact
    No: " VerticalAlignment="Top" />
                        <TextBox Width="350" Height="70" HorizontalAlignment="Left" Margin="108,61,0,480" Name="txtContact"
    Text="Enter your contact number" MaxLength="10" />
                        <Button Content="Register" Height="72" HorizontalAlignment="Left" Margin="10,330,0,0" Name="btnRegister"
    VerticalAlignment="Top" Width="190" Click="btnRegister_Click" />
                    </Grid>
    xaml.cs:
    private void btnRegister_Click(object sender, RoutedEventArgs e)
                string name, contact;
                name = txtName.Text;
                contact = txtContact.Text;
                try
                    if (name != "" && contact != "")
                        string msg = name + " " + contact;
                        MessageBox.Show(msg);
                        Student stud = new Student
                            Name= name,
                            Contact = contact,
                        string jsonString = JsonConvert.SerializeObject(stud);
                        MessageBox.Show(jsonString);
                    else
                        MessageBox.Show("Input Proper Information", MessageBoxButton.OK);
                catch (Exception ex)
                    MessageBox.Show(ex.Message);
    I have download NewtonSoft.json version 5.0.8.
    So, I am able to convert input data into json format, but how can I able to write and read this data from a json/text file.
    How can I do?
    Thank you in adv and please, reply soon.

    We don't have many samples left for Windows Phone 7 + Azure, the closest one to what you want to do is probably:
    Using Local Storage with OData on Windows Phone To Reduce Network Bandwidth
    this sample uses the local database feature: 'LINQ to SQL', available to Windows Phone 7.1 and 8.0 Silverlight applications, instead of simple file storage but even if you choose to stick with simple file storage I believe you should be able to adapt the
    networking related portions of the sample to your particular application.
    Eric Fleck, Windows Store and Windows Phone Developer Support. If you would like to provide feedback or suggestions for future improvements to the Windows Phone SDK please go to http://wpdev.uservoice.com/ where you can post your suggestions and/or cast
    your votes for existing suggestions.

  • Create Pie Chart and Vertical bar chart using report builder 3.0 with sharepoint custom list

    Hi All,
    I have a client requirement to create reports which should show the graphical representation of SharePoint Custom List data. The reports are Month wise and YTD. Also i have to create dashboard.
    For creating reports, i have heard about Report Builder and SSRS. I have SQL server 2008r2 and installed report builder 3.0 but i am not aware of creating reports(KPI, Pie Chart, Vertical bar, etc.,) with sharepoint customlist.
    Can some one please help me on this.
    MercuryMan

    Here is some information about using the SharePoint List Data source with SSRS/Report Builder/BIDS:
    http://www.infotoad.com/blog/post/2012/10/11/using-a-sharepoint-list-connection-type-as-a-data-source-for-reporting-services.aspx
    http://technet.microsoft.com/en-us/library/ee633650.aspx
    http://www.codeproject.com/Articles/24469/SQL-Reporting-Services-data-from-SharePoint-lists
    Trevor Seward
    Follow or contact me at...
    &nbsp&nbsp
    This post is my own opinion and does not necessarily reflect the opinion or view of Microsoft, its employees, or other MVPs.

Maybe you are looking for