๋ฆฌ์กํธ์์ ๊ทธ๋ฆฌ๋์ ๋ฐ์ดํฐ์ ์์ ํน์ ์นผ๋ผ์ ํน์ ๊ฐ์ ์ฐพ์์ผํ๋ ์ํฉ์ด ์์๋ค.
์ด๋ฐ ์ํฉ์์ xplatform์์๋ lookupํจ์๋ฅผ ์ฌ์ฉํ์๋ค.
var name = studentList.lookup("studentId",1,"studentNm");
studentId(ํ์๋ฒํธ)๊ฐ 1์ธ ํ์๋ช ์ ์ฐพ์ ์์ค์ด๋ค.
๋ฆฌ์กํธ์์๋ ์ด๋ฐ ํจ์๊ฐ ๋ญ๊ฐ ์์๊น, ํ๋ค๊ฐ findํจ์๋ฅผ findํ๋ค.
const list = studentList?.find((element) => element.studentId === 1);
const name = list.studentNm;
lookup๊ณผ ๋ค๋ฅด๊ฒ find๋ ํด๋น row๋ฅผ ๋ฐํํด์ค๋ค.
๊ทธ๋ ๊ธฐ ๋๋ฌธ์ ๊ทธ row์์ studentNm์ ๋ค์ ์ฐพ์์ค์ผ ํ๋ค.