Storing Serial Data Received by ESP32 in a variable

Hey there,
I am building a project which involves the use of sending data of sensors like LDR and GPS from Arduino to ESP32. Now, my question is that is there a way to store the values sent via Serial communication to ESP32, in a variable. Because I want the values processed by the Arduino to be stored in the variables defined in the code of ESP32, so that they can be Sent on Arduino Cloud to make an IOT based system.
Siddharth Cheema

See Serial input basics - updated for examples of how to do this

Hi @Siddharth_Cheema

Yes there is!!

See that my answer is correct, but its synthesis is the same as your question.
No informations !!

RV mineirin

+1 for serial input basics.