Save GameObject order in grid layout group after drag and drop element in playerprefs

Hi. I want to save in playerprefs order of LayoutElements in Grid layout group. I have 2 scripts to drag and drop UI elements.

using UnityEngine;
public class DragOrderContainer : MonoBehaviour {
    public GameObject objectBeingDragged { get; set; }
    void Awake () {
        objectBeingDragged = null;
    }
}

and

using UnityEngine;
using UnityEngine.UI;
using UnityEngine.EventSystems;
public class DragOrderObject : MonoBehaviour, IPointerEnterHandler, IBeginDragHandler, IDragHandler, IEndDragHandler {
    DragOrderContainer container = null;
    void Start () {
        container = GetComponentInParent<DragOrderContainer>();
    }
    public void OnBeginDrag(PointerEventData eventData)
    {
        container.objectBeingDragged = this.gameObject;
    }
    public void OnDrag(PointerEventData data)
    {
        // Do nothing
        // Apparently this interface needs to exist in order for BeginDrag and EndDrag to work,
        // but we don't actually have anything to do here
    }
    public void OnEndDrag(PointerEventData eventData)
    {
        if (container.objectBeingDragged == this.gameObject) container.objectBeingDragged = null;
    }
    public void OnPointerEnter(PointerEventData eventData)
    {
        GameObject objectBeingDragged = container.objectBeingDragged;
        if (objectBeingDragged != null && objectBeingDragged != this.gameObject)
        {
            objectBeingDragged.transform.SetSiblingIndex(this.transform.GetSiblingIndex());
        }
    }
}

How can i simple save order somethink like that ?

using System.Collections;
using System.Collections;
using System.Collections.Generic;
using UnityEngine;
using UnityEngine.UI;

public class Saveposition : MonoBehaviour
{


    public GameObject[] panel;

    void Awake()
    {
        for (int i = 0; i < panel.Length; i++)
        {

            panel[i] = PlayerPrefs.transform.GetSiblingIndex(panel[i].name);
        }

    }


    private void OnApplicationQuit()
    {


        for (int i = 0; i < panel.Length; i++)
        {
            PlayerPrefs.transform.SetSiblingIndex(panel[i].name, panel[i]);

        }
    }


    private void OnApplicationPause(bool pause)
    {




        for (int i = 0; i < panel.Length; i++)
        {
            PlayerPrefs.transform.SetSiblingIndex(panel[i].name, panel[i]);
            PlayerPrefs.Save();

        }


    }


}

Use a Json file, is more clear

I don’t know how to do it :frowning: I am beginner and i try to make this script last 5 days. It’s horrible

Search some tutorial about, it’s worth