title: How to map array into checkbox for React Native [TypeScript]?
body: <p>I am new to React Native. I am currently using TypeScript for my React Native project. Right now, I am having a difficulty on how to map array into checkbox. Below is my json file:</p>
  
  <pre><code>{ 
     "stud_name": "Adam",
     "sex": "male",
     "attendance": false,
     "eligibility": false
  }
  </code></pre>
  
  <p>I would like to map <code>attendance</code> and <code>eligibility</code> inside the checkbox. Below is my React Native code for the checkbox.</p>
  
  <pre><code>export const StudentRegisterExam: React.FC&lt;Props&gt; = ({}) =&gt; {
    const StudentData = useContext(StudentStoreContext);
  
    const firstRender = useRef(true);
    useEffect(() =&gt; {
      if (firstRender.current) {
        firstRender.current = false;
        return;
      }
      if (response !== undefined) {
        if (response.status === 201 || response.status === 200) {
          StudentData.details = {
             name: response.data.name,
             sex: response.data.sex,
             eligibility: response.data.eligibility,
             attendance: response.data.attendance
         };
       }
     }
   }, [response]);
  
  return (
        &lt;View&gt;
          &lt;Text&gt;{StudentData.response.name}&lt;/Text&gt;
          &lt;Text&gt;{StudentData.response.sex}&lt;/Text&gt;
          &lt;CheckBox /&gt; &lt;- how should I write {StudentData.response.eligibility} into checkbox
          &lt;CheckBox /&gt;
        &lt;/View&gt;
   );
  </code></pre>
  
  <p>Thank you in advance. For the <code>StudentData</code>, I created a file name <code>StudentStore.ts</code> inside my store folder.</p>