How to extract certain data

const NativeTransactions = () => {

    const { getNativeTransations, data, chainId, error, isLoading, isFetching } = useNativeTransactions();

    return (
      <div>
        {error && <>{JSON.stringify(error)}</>}
        <button onClick={() => getNativeTransations({ params: { chain: "0x1" } })}>Refetch</button>
        <pre>{JSON.stringify(data, null, 2)}</pre>
      </div>
    );
  };

so when calling for data how do I get for instance only the hash? What if I want the “hash” and “from_Address”? Basically what im asking is how do i only get certain data from the JSON string?
I know if I add .results to data it only returns the result object but what do i do after that?

also what does the null in the parameters for stringify mean?

<pre>{JSON.stringify(data, null, 2)}</pre>

Thanks! Getting close to a working prototype lol

you say that you don’t know how to access a specific key from that object?

yea embarrasing lol just started learning JS recently, help a brother out.

you can look in that printed output on how the fields look like and then you can try data.field_name or data.get(‘field_name’), or other similar syntax

actually why did I ask this here… i will go to stack overflow sorry for a needless thread

gotcha thanks! you guys are super helpful moralis is truly braindead simple to use