Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR PYTHON

how to count number of records in json

'''
USE len() TO COUNT THE ITEMS IN A JSON OBJECT
Call len(obj) to return the number of items in a JSON object obj.
'''

print(a_json_object)
'''OUTPUT:													'''
'''{'first_key': [1, 2, 3], 'second_key': 'second_value'}	'''
length = len(a_json_object)

print(length)
'''OUTPUT:													'''
'''2														'''
Source by www.kite.com #
 
PREVIOUS NEXT
Tagged: #count #number #records #json
ADD COMMENT
Topic
Name
3+5 =