Multisearch example not found in docs for opensearchJS

I am using the opensearchJs client to send requests. When looking through the docs for opensearchJs there are no examples on how a multisearch query body should be structured in order to use the client correctly.

Does the user need to format the body such that earch query needs to be on a single line as defined here or does the client do this formatting if given a normal array of json objects?

i.e. do I need to format the body to

[
  {},
  {"from": 0, "limit": 5, "query": {"query": {"bool": {...}}}}
]

Or could I pass in

[
  {},
  {
    "from": 0,
    "limit": 5,
    "query": {
      "bool": {
        ...
      }
    }
  }
]