A RetroSearch Logo

Home - News ( United States | United Kingdom | Italy | Germany ) - Football scores

Search Query:

Showing content from https://arduinojson.org/v7/api/jsonarray/size/ below:

JsonArray::size() | ArduinoJson 7

Description

JsonArray::size() gets the number of elements in the array pointed by the JsonArray.

If the JsonArray is null, this function returns 0.

Internally, this function walks a linked-list to count the elements, so its time complexity is O(n).

Don’t use this function to create a for loop; instead, use iterators.

Signature Return value

JsonArray::size() returns an unsigned integer containing the number of elements in the array.

Example
JsonArray array = doc.to<JsonArray>();
array.add("hello");
array.add("world");
Serial.println(array.size()); // 2
See also
  1. Home
  2. Version 7
  3. API
  4. JsonArray
  5. size()

RetroSearch is an open source project built by @garambo | Open a GitHub Issue

Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo

HTML: 3.2 | Encoding: UTF-8 | Version: 0.7.4