String appears to be not string

I'm getting a number from firebase that is in string form, ex "34"

//fb https://nodemcu-2ff83-default-rtdb.europe-west1.firebasedatabase.app/1711/aeg/aeg.json
String payload = https.getString();
int x = payload.toInt();

toInt() returns 0
printing payload gives: "34"

nb! If i do Serial.println("34") it gives 34 without quotations

Serial.println(payload=="34");

this returns false.

What do you see when you print payload?

it prints "34".

nb! if i do Serial.println("34") it prints 34 without quotations

toInt is returning 0 because it's hitting an error.

Yes, of course. A quoted bunch of characters is taken as such and printed.

       Serial.println("Hello there!");

a7

Is the quote mark in "34" messing up the toint call?

Yes. toInt stops at the first character that isn't numeric, such as ".