B
B
Baraban4ik2021-11-05 16:12:18
Python
Baraban4ik, 2021-11-05 16:12:18

I want to do replacement or addition to json in python?

Here I have a json file:

{
  "894452684072046652": [
    {
      "welcome": {
        "text": "Ты должен(на) указать текст прощание."
      }
    }
  ]
},
{
  "89445266072046658": [
    {
      "welcome": {
        "text": "Ты должен(на) указать текст прощание."
      }
    }
  ]
}

I want if 894452684072046652 this id is not in the file then add it and if not then replace the text field

Answer the question

In order to leave comments, you need to log in

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question