Python Forum
Thread Rating:
  • 1 Vote(s) - 1 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Extract values from array
#6
Your json object is a nested dictionary, probably with some lists, you can access dictionary values using keys, while lists are indexed with numbers. From print output it is hard to see what exactly your jsonobj is, but you can try
jsonobj['fields']['customfield_98765']
It probably returns list of Sprints, if so, you can try to access first one with
jsonobj['fields']['customfield_98765'][0]
and last one with
jsonobj['fields']['customfield_98765'][-1]
If it doesnt work, post output of repr(jsonobj).
Reply


Messages In This Thread
Extract values from array - by mehtamonita - Apr-17-2017, 04:40 AM
RE: Extract values from array - by Larz60+ - Apr-17-2017, 05:06 AM
RE: Extract values from array - by mehtamonita - Apr-17-2017, 07:47 AM
RE: Extract values from array - by zivoni - Apr-17-2017, 08:33 AM
RE: Extract values from array - by mehtamonita - Apr-17-2017, 10:47 AM
RE: Extract values from array - by nilamo - Apr-18-2017, 03:52 AM
RE: Extract values from array - by mehtamonita - Apr-18-2017, 02:45 PM
Extract values from JSON format - by mehtamonita - Apr-17-2017, 04:41 AM
RE: Extract values from JSON format - by Larz60+ - Apr-17-2017, 05:04 AM

Possibly Related Threads…
Thread Author Replies Views Last Post
  extract only text strip byte array Pir8Radio 7 3,143 Nov-29-2022, 10:24 PM
Last Post: Pir8Radio
  Create array of values from 2 variables paulo79 1 1,158 Apr-19-2022, 08:28 PM
Last Post: deanhystad
  Creating a numpy array from specific values of a spreadsheet column JulianZ 0 1,216 Apr-19-2022, 07:36 AM
Last Post: JulianZ
  PDF Extract using CSV values atomxkai 5 2,132 Jan-13-2022, 12:20 PM
Last Post: Pedroski55
  Calculate next rows based on previous values of array divon 0 1,875 Nov-23-2021, 04:44 AM
Last Post: divon
  Dataframe extract key values danipyth 0 1,702 Feb-07-2021, 03:52 PM
Last Post: danipyth
  xml.etree.ElementTree extract string values matthias100 2 5,148 Jul-12-2020, 06:02 PM
Last Post: snippsat
  python3 List to array or string to extract data batchenr 4 3,382 May-28-2019, 01:44 PM
Last Post: buran
  change array column values without loop khalidreemy 2 3,918 May-05-2019, 09:05 AM
Last Post: DeaD_EyE
  finding 2 max values in an array in python Akankshha 11 219,491 Oct-18-2018, 09:16 AM
Last Post: perfringo

Forum Jump:

User Panel Messages

Announcements
Announcement #1 8/1/2020
Announcement #2 8/2/2020
Announcement #3 8/6/2020