Skip to main content

All Questions

Tagged with
0 votes
1 answer
40 views

How to get the last value in json array

How can I get the last value in a json array. row = {'title': 'Consolidated form', 'question_type': 'year_of_birth_question', 'tags': 'test-form', 'slug': 'test-form', 'version': 'v1.01', 'locale': '...
user24242514's user avatar
-3 votes
1 answer
53 views

Set JSON array as variable for json.dumps [duplicate]

I'm searching for a way to read a specific value of multiple JSON arrays. I was able to count them and now want to get a specific value from each of them but I wasn't able to find a way to set [0], [1]...
Chri89's user avatar
  • 1
0 votes
1 answer
44 views

Fetch Nth Keys from a Struct in Python

Here is my json which has nested structs or list in it. I want to extract all the nth key from the JSON after parsing through all of them. I am doing this in python and able to crack it through re-...
user3624000's user avatar
-5 votes
1 answer
63 views

How to process two very large JSON files with Python? [closed]

I have two files named smaller_file.json and larger_file.json. While both have the potential to be quite large, reaching over 200MB, the smaller_file.json will always be the smaller of the two. I want ...
ttmtran's user avatar
  • 61
0 votes
1 answer
653 views

Azure OpenAI On Your Data API: How to pass Azure AI Search (the Index name) to the Chat completion

I've edited the question: I want to migrate or pass my index_name from Azure OpenAI (with my data) in the bot in Python. I tried to adjust this code_1 as well as this code_2 but it did not work. The ...
ChrisGila's user avatar
0 votes
2 answers
57 views

Python - Remove elevents from JSON containing a certain value

I'm trying to mass-delete a bunch of items from my spotify streaming data by specific artists (mostly just trying to remove a bunch of audiobooks). The data is in the form of a bunch of JSONs ...
Tim F's user avatar
  • 1
0 votes
2 answers
130 views

jq equivalent in python

cat * | jq '.cis[].properties.cloud_vm_display_name' | grep -v null "azuXXXXX" "azuXXXXX" "azuXXXXXX" "azuXXXXXX" Need to extract cloud VM name from multiple ...
Amit Sharma's user avatar
-2 votes
2 answers
60 views

How to search JSON for data, get vlaues from that array in Python

I have the below JSON. I want to search each array, and only scrape the data from the array which has keys and values in the "source" block, ignoring arrays which have an empty "source&...
speedyrazor's user avatar
  • 3,235
0 votes
1 answer
51 views

How to use error correction when iterating through a json array

I am trying to extract the values associated with the keys 'techniqueID' and 'comment'. The issue I am running in to is that the after retrieving the value associated with the first 'comment' key (...
TrashThrash's user avatar
-3 votes
1 answer
71 views

python array dictionary inside dictionary [closed]

I have python dictionary the code: {'code': 200, 'msg': '', 'snapshotVos': [{'data': {'balances': [{'asset': 'ADD', 'free': '10', ...
salim's user avatar
  • 3
0 votes
1 answer
69 views

Sorting an Array of Objects in Python using Specific Keys

My Requirement is to go through all arrays of objects within a json and, if an array of objects contain the contain the field "StartDate", sort that particular array of objects from the ...
Jonar Ramos's user avatar
0 votes
1 answer
71 views

How to convert pyspark data frame structure into a nested json array with multiple occurances

How to convert a pyspark data frame like below to a json array structure OrderID field fieldValue itemSeqNo 123 Date 01-01-23 1 123 Amount ...
phoenix2023's user avatar
0 votes
1 answer
60 views

Creating a JSON array from two lists using pandas

Is is possible to zip two lists into a JSON array? Input: keys=["['os','dist','rel','flag']", "['os','dist']", "['os','dist','rel']", &...
CLT00's user avatar
  • 11
0 votes
1 answer
71 views

Converting a log.txt file to JSON using python

I am learning Python and have very limited programming knowledge, as a learning project I have a .txt system log that I am trying to convert to JSON. I want the python program to parse through the ....
tthhhww's user avatar
1 vote
1 answer
55 views

Python JSON parser not seeing a single key

Trying to make a script to iterate over some JSON coming from an API that is formatted like this: {'disk': 0, 'pid': 1234, 'cpus': 4, 'maxdisk': 80530636800, 'diskwrite': 0, 'netout': 18664223636, '...
Davis Sayer's user avatar

15 30 50 per page
1
2 3 4 5
50