Python Forum
Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Key Value Pair output
#1
Hi,

My api currently has an output of [1, "Apple"], [2, "Banana"], [3, "Orange"] and I've been told it should be a key value pair. My Return code is

return {
'statusCode': 200,
'headers': {'Content-Type': 'application/json'},
"body": json.dumps(rows)
}
What do I need to do to fix this?

Thanks in advance

Todd
Reply


Messages In This Thread
Key Value Pair output - by UtiliseIT - May-02-2019, 05:57 AM
RE: Key Value Pair output - by buran - May-02-2019, 06:06 AM
RE: Key Value Pair output - by UtiliseIT - May-02-2019, 06:45 AM
RE: Key Value Pair output - by buran - May-02-2019, 06:59 AM
RE: Key Value Pair output - by UtiliseIT - May-02-2019, 07:00 AM
RE: Key Value Pair output - by buran - May-02-2019, 07:02 AM
RE: Key Value Pair output - by UtiliseIT - May-03-2019, 04:41 AM
RE: Key Value Pair output - by buran - May-03-2019, 07:06 AM
RE: Key Value Pair output - by UtiliseIT - May-03-2019, 07:20 AM
RE: Key Value Pair output - by buran - May-03-2019, 07:30 AM

Possibly Related Threads…
Thread Author Replies Views Last Post
  Getting the maximum value:key pair from a dictionary sean1 2 1,546 Jan-17-2022, 01:04 PM
Last Post: DeaD_EyE
  How to extract specific key value pair from string? aditi06 0 2,661 Apr-15-2021, 06:26 PM
Last Post: aditi06
  Auto re-pair / re-sync Controller via Script? User3000 2 2,494 Nov-30-2020, 11:42 AM
Last Post: User3000
  team pair issue jk91 29 8,894 Mar-03-2020, 06:15 PM
Last Post: jefsummers
  Search a List of Dictionaries by Key-Value Pair; Return Dictionary/ies Containing KV dn237 19 7,135 May-29-2019, 02:27 AM
Last Post: heiner55
  Parsing Text file having repeated value key pair using python manussnair 3 3,430 Aug-04-2018, 11:48 PM
Last Post: micseydel

Forum Jump:

User Panel Messages

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