How to and a new field and update value dynamically through mongo shell

Okay @turivishal ,Thanks for your time, this is the solution,

db.businesslistings.updateMany({},
[
  {
    $set: {
      "address": {
        $getField: {
          input: {
            $arrayElemAt: [
              {
                $getField: {
                  input: {
                    $arrayElemAt: [
                      "$attributes",
                      0
                    ]
                  },
                  field: "basicDetails"
                }
              },
              1
            ]
          },
          field: "valueString"
        }
      }
    }
  }
])