function Socialpostdetail() {
const [item, setItems] = useState([])
let {resultId} = useParams();
const { Moralis, isInitialized } = useMoralis();
console.log(resultId)
const { data, error, isLoading } = useMoralisQuery("Posts");
useEffect(async () => {
const Posts = Moralis.Object.extend("Posts");
const query = await new Moralis.Query(Posts);
query.equalTo("title", resultId);
const object = await query.first();
const results = JSON.stringify(object, null, 2)
const finalResult = JSON.parse(results)
setItems(finalResult)
}, [])
console.log(item.author.username)
Iām trying to render this in where I have an item which contains an author object, I can render everything in the object correctly, but the author as it comes from another class it says that it is undefined. Can someone help me with this?