Storing long json output of curl command in a Windows batch file variable

  batch-file, curl, windows

The output that I am getting from curl command is quite long.

For storing it in a variable, I have tried using, //not specifying the actual curl command here:

for /F %%I in ('curl -u COMMAND') do SET ip = %%I
echo %ip%

But echo %ip% shows less than half of output on the console.

I want variable to store the entire output obtained.

Executing curl command directly gives expected output, but echo %ip% cuts that output.

Source: Windows Questions