Hello guys I\'m trying to find all the results that have a in them. I have tried a couple of ways but the problem is nothing works. It just returns an empty array
TypeORM provides out of the box Like function. Example from their docs:
Like
import {Like} from "typeorm"; const loadedPosts = await connection.getRepository(Post).find({ title: Like("%out #%") });
in your case:
var data = await getRepository(User).find({ name: Like(`%${firstName}%`) });