Pick a value from a wifi scan and use it after to compare

i'm using a esp32, and you have an example of Wifi Scan

This is my program so far

//s'inclou llibreria WiFi
#include "WiFi.h" 

//pins ultrasò
const int Trigger = 26;   
const int Echo = 25;  

//pins Motor A
int enableA = 34;
int motorA1 = 35;
int motorA2 = 32;

//pins Motor B
int enableB = 19;
int motorB1 = 5;
int motorB2 = 17;

*int ValorAnterior;*
*int ValorActual;*

void setup() {
 
  WiFi.mode(WIFI_STA);
  WiFi.disconnect();
  delay(100);

  pinMode(Trigger, OUTPUT); 
  pinMode(Echo, INPUT);  
  digitalWrite(Trigger, LOW);
   
  pinMode (enableA, OUTPUT);
  pinMode (motorA1, OUTPUT);
  pinMode (motorA2, OUTPUT);  
  
  pinMode (enableB, OUTPUT);
  pinMode (motorB1, OUTPUT);
  pinMode (motorB2, OUTPUT);  
  

}

void loop() {

//wifi scan 
 Serial.println("scan start");

    int n = WiFi.scanNetworks();
    Serial.println("scan done");
    if (n == 0) {
        Serial.println("no networks found");
    } else {
        Serial.print(n);
        Serial.println(" networks found");
        for (int i = 0; i < n; ++i) {
    
            Serial.print(i + 1);
            Serial.print(": ");
            Serial.print(WiFi.SSID(i));
            Serial.print(" (");
            Serial.print(WiFi.RSSI(i));
            Serial.print(")");
            Serial.println((WiFi.encryptionType(i) == WIFI_AUTH_OPEN)?" ":"*");
            delay(10);
        }
    }
    Serial.println("");


}