Giter Site home page Giter Site logo

Comments (2)

jwframe avatar jwframe commented on May 18, 2024

In order to return the full data you must use the "noTruncate" parameter.

=ImportJSON("https://matthewkosloski.me/foo.json",,"noTruncate")

Refer to this section (specifically lines 44 & 50 of the importJSON.gs file).

Imports a JSON feed and returns the results to be inserted into a Google Spreadsheet. The JSON feed is flattened to create a two-dimensional array. The first row contains the headers, with each column header indicating the path to that data in the JSON feed. The remaining rows contain the data.

By default, data gets transformed so it looks more like a normal data import. Specifically:

  • Data from parent JSON elements gets inherited to their child elements, so rows representing child elements contain the values of the rows representing their parent elements.
  • Values longer than 256 characters get truncated.
  • Headers have slashes converted to spaces, common prefixes removed and the resulting text converted to title case.

To change this behavior, pass in one of these values in the options parameter:

  • noInherit: Don't inherit values from parent elements
  • noTruncate: Don't truncate values
  • rawHeaders: Don't prettify headers
  • noHeaders: Don't include headers, only the data
  • debugLocation: Prepend each value with the row & column it belongs in

Additional Comments:
Note the two commas between the "url" and the "noTruncate" parameter. If you wish to retrieve all the data in the file, you do not need a value between the commas. If you would like to only the data in a specific section... example: "i_am_512_chars_long" . Place this information between the two commas.

Example:
=ImportJSON("https://matthewkosloski.me/foo.json","/i_am_512_chars_long","noTruncate")

I hope that this is helpful to you. I am very grateful for the work that has been done by Trevor Lohrbeer, Brad Jasper, and others to create such a wonderful tool.

from importjson.

maxiride avatar maxiride commented on May 18, 2024

Since this is solved you should mark the issue as closed =)

from importjson.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.