如何解决反应如何使用嵌套的对象数组来解构对象数组
我最近进行了一次技术测试,测试的目的是从api中获取指令列表,将其存储在redux中并进行渲染。基本上就是服务文档。
api返回了大量的对象,包括嵌套的对象数组等。我很快就想尽办法去破坏所有对象。
我没有得到这份工作,但想从中学习并将其作为学习经验,我们将不胜感激!
我已经将其简化为:
[
{
title: "Some Title",copy: "Some copy",},{
title: "Some other Title",curl: "some instruction",dotNet: "some instruction",javascript: "some instruction",{
title: "Another Title",{
title: "Yet Another Title",image: {
fields: {
title: "Image Title",file: {
url: "//imgurl",details: {
image: {
width: 100,height: 200,caption: "some caption",{
title: "This is the title",{
title: "Another title",modules: [
{
fields: {
title: "Title again",copy: "Copy again",{
fields: {
title: "Im another title",],];
版权声明:本文内容由互联网用户自发贡献,该文观点与技术仅代表作者本人。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌侵权/违法违规的内容, 请发送邮件至 dio@foxmail.com 举报,一经查实,本站将立刻删除。