Can't assign elements to index in array
I'm trying to understand your code.


It looks like x is a state variable, with the following values:

2 = "Looking for start brace (`{`)"
1 = "Found! Now accumulating `day` until stop brace (`}`)"
0 = "Finished!"


If so, you may instead want to use the following:

enum States { Looking, Adding, Done };

// int x = 2;
States state = Looking;

// x = 1
state = Adding;

// if (x==1){
if (state==Adding) {

If you follow the flow of code, when number is still 0 and x finally becomes 0, you:


Print out number - the first line of your output;
You then miss the main if (number is not greater than 0);
And enter the else (which is satisfied);
And then you immediately clear your hard-earned day.

The second time through, after x becomes 0 again, this time you:


Print out number - the second line of your ouptut;
You do enter the main if:


You assign day to Combo[1]
You print out only the first seven entries in the the array (you want &lt;=7, not &lt;7)


This should print out 0{?}000000 (I don't know what day should be).
The fact that it doesn't seems to imply that your concat() failed. Can you please change it to

// day.concat(sym);
if (!day.concat(sym)) {
    Serial.println("concat() error!");
} // if


You then print out the row of dashes - and start a new line.

The third time through, it seems to work - you get your {$ "first string" $} (where $ represents \n and/or \r - can you strip those out?)

      // if (x==1){
      //    day.concat(sym);
      if (x==1 &amp;&amp; sym&gt;=' '){ // Don't concat new line characters!
          day.concat(sym);

And the final few times concat() seems to have failed again.



The reason I say "concat() has failed" is that it looks like day is still "" when it is assigned to Combo

Edit

You've changed the code so that the main if now does the following:


Assigns day to Combo[number-1];
Prints out day - this seems to work;
Assigns day to Combo[number-1] again;
Prints out a line of hyphens - this works;
Prints out Combo[number-1] - this does NOT seem to work;
Prints out two lines of hyphens - this works.


Since 5 is printing out nothing, it implies that 3 failed. This really does look like you're in a low-memory condition, and the system is failing to allocate memory from the heap.

You don't say what Arduino you're working on - note that most don't have much memory, and if you're already parsing a JSON file you've probably used a lot of it. You also don't say which version of the Arduino IDE you're using. There was a String bug in the earlier versions.

Rather than trying to use the String class (a renowned heap hogger), you should try to use normal char arrays and work the buffer management yourself.