What is the best way to operate on JSON - pulling, adding and doing a trigger?

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • momorix
    New Member
    • Aug 2020
    • 2

    What is the best way to operate on JSON - pulling, adding and doing a trigger?

    Ladies and gentlemen ,i learn by doing simple examples but every time when try to extract some data yourself, rework it and display it as I want it, I have a problem.

    I never know when and how and what I have to use to get a typical json
    Code:
    [
        { item1:
         [ '1',
           '2nd',
           '3thv'
        ] },
        { item2:
         [ '1',
           '2nd',
           '3th'
         ] }  
    ]
    I'd like to format it so that I can delete it into a csv file


    My second question is how the easiest way to trigger an event

    For example. Gets a get to the json with the X:Y data, then i want the Y value to run a function that returns the new get to another enpoint with a value that depends on X
  • isladogs
    Recognized Expert Moderator Contributor
    • Jul 2007
    • 479

    #2
    There really is no such thing as a typical JSON.
    The JSON file syntax allows for a wide range of valid files, some of which are 'legal' but poorly constructed. This can make handling certain JSON files quite tricky

    I can't provide links here but the following may be helpful
    1. There are free online converters that allow you to convert e.g USON to CSV
    2. I have an app on my website which is used for analysing the structure of JSON files then transforming the file for importing into Access as one or more normalised tables.
    3. Excel has a very powerful built in feature originally called Power Query but now Get & Transform. This does the same as my Access app but the feature isn't available in Access unfortunately.

    Suggest you do an online search for each of these or send me an PM if you need more info.

    I have no experience of working with JSON using JavaScript

    Sorry but I have no idea what your second question means

    Comment

    • dev7060
      Recognized Expert Contributor
      • Mar 2017
      • 655

      #3
      I never know when and how and what I have to use to get a typical json
      I'd like to format it so that I can delete it into a csv file
      Make changes in the code to parse the obtained json correctly. Once that is achieved, conversion to csv can be done.

      Comment

      • momorix
        New Member
        • Aug 2020
        • 2

        #4
        Originally posted by dev7060
        Make changes in the code to parse the obtained json correctly. Once that is achieved, conversion to csv can be done.
        but how am I supposed to parse it ?

        Comment

        • isladogs
          Recognized Expert Moderator Contributor
          • Jul 2007
          • 479

          #5
          Did you investigate any of the three suggestions I made?
          You can also find JSON parsing code on e.g. GitHub

          Comment

          • dev7060
            Recognized Expert Contributor
            • Mar 2017
            • 655

            #6
            but how am I supposed to parse it ?
            By writing some code. What is the progress so far?

            Comment

            Working...